How to Hide from AI — The Winner Interview

Stoneztao
ACM at UCSD
Published in
4 min readJul 19, 2020

--

Congratulations to Joe Cai for winning the first ever AI programming competition at UCSD, hosted by ACM AI! 🥇

First a little context

ACM AI released their first AI competition, Hide and Seek, where the objective is to develop a bot that is capable at hiding from seekers and seeking hiders on a map filled with walls that block vision. More information here.

A replay of a game of hide and seek, with blue seekers chasing the red hiders into a corner and winning the game

And now the interview on who the winner is, and how he won the chicken dinner

Introduce yourself!

My name is Joe, a upcoming third year CS major in Marshall college at UCSD. I love pizza, which is why my bot name is pizza.

How did you hear about the competition and what made you want to compete?

My friend Jeff and I were doing a course on AI, and Jeff found the competition and shared details about it to me. I liked the competitiveness and the feeling that my work pays off through the online leaderboard and rankings providing live feedback.

The AI course I was taking also helped motivate me to dive deeper and since I had nothing much to do, I decided to join in and try to compete in something different from standard programming competitions. I liked how it wasn’t your typical hackathon and that made it all the more interesting

What did you think about the hide and seek design?

Overall, the idea of hide and seek was intriguing because I never thought of hide and seek as anything other than a simple game. Once I got into coding and strategizing, I realized that it was far from simple, and took a lot more thinking and planning to figure out what was happening and how to effectively hide and seek.

I liked how I could choose certain seeds for maps, which helped development a lot as it provided consistency and helped with debugging.

Another interesting thing is that there aren’t answers or any special prior knowledge one could bring to the competition. You can only get so much out of searching on google, before actually having to dive deep myself. I was only able to use my knowledge on some basic data structures and path finding algorithms.

How did you approach building your bot for hide and seek?

I first thought about building the seeker side. My initial idea was if I see a hider, I would just follow the previous location of the hider and keep chasing. When the seekers couldn’t see any hiders, I would make them use a Depth First Search (DFS) algorithm to explore the edges of the map before exploring towards the center. My reasoning was that hiders typically spawn towards the edges as opposed at the center, so this helped my seekers cover ground more effectively. It had a lot of bugs unfortunately, but after some hard work I was able to work them out.

For the hider I had two strategies implemented. One strategy would have hiders travel the furthest distance away if seen by a seeker, otherwise I would make hiders stay still if they weren’t seen by a seeker. Another strategy I made some hiders use was to make hiders to circle around “islands” formed by walls as this made it hard for seekers to catch the hider if the hider ran circles around the walls. I used Breadth First Search (BFS) specifically on the walls, and if the BFS reached the edge of the map, then it wouldn’t be an island.

After I found the island, which consists of walls. Then for each wall, I would retrieve the spaces around the wall, and apply the convex hull algorithm to get an outline of the spaces around the walls. This gave me the shortest circling path my units could take to avoid seekers efficiently.

I believe that it was more effective to distribute the two strategies amongst hiders, having some run away while having some go to an island to run around, this way they wouldn’t clump together and all get caught at once.

Any strategies or algorithms you considered but didn’t use?

I considered using the min-max algorithm because my AI course was teaching about it and explaining how effective it was for a 2 agent game. However, I ended up being too lazy to implement it.

What was your overall experience in the competition?

I thought it was really fun as I got to compete head on against other UCSD students and the competitiveness was nice. I’m hoping there will be even more competitors next time!

Any comments about the competition?

It was fun 😄

Thank you Joe! Hope to see you in the next competition coming up this fall!

Make sure to join the competition discord here https://discord.gg/XsG5etY to be up to date on everything related to our AI competitions! We support any programming language and will be giving out even bigger prizes 💸 so stay tuned!

~ 🤖

--

--