How to Hide from AI — The Winner Interview
Tags: Competition, AI

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 😄