AI beats humans in Geoguesser
Table of Contents
- Introduction
- Designing an AI for Geoguesser
- Training the AI
- Using the AI to Play Geoguesser
- Results and Analysis
- Future Possibilities
- Conclusion
Introduction
Geoguesser is a popular online game that challenges players to guess their location Based on a random street view image. While some players are able to quickly identify their location with incredible accuracy, others struggle to even get close. This made me wonder, could an AI be designed to play Geoguesser? In this article, we will explore the process of designing an AI for Geoguesser, training it, and using it to play the game.
Designing an AI for Geoguesser
Before we can Create an AI for Geoguesser, we need to think about how we will design it. To simplify the problem, we will focus on creating an AI for the United States map on Geoguesser, rather than the entire world. However, this does not automatically mean we will get a higher score, as the scoring formula is adjusted and therefore will need to be more accurate. Additionally, the average score is still under 10,000.
One possible way to design this AI would be to give it a street view image and have it guess the Latitude and longitude of the image. Another possibility is that we could give it an image and have it guess the state it belongs to. After some experimenting with different designs, the best solution that I found was to predict the square it belongs to on the map. Each square is approximately 340 miles tall and 360 miles wide, so being able to predict the correct square would result in a fairly accurate guess.
However, the way AIs like this work is that they won't predict exactly one square it belongs to, but give a confidence level to each square. For example, consider an AI that has been trained to recognize animals. If given an image, the AI won't simply say that it's a dog. Instead, it will give its confidence for how sure it is of the Type of animal. For example, it may be 80% confident it's a dog, 10% confident it's a wolf, 7% confident it's a fox, and 3% confident it's a cat. These confidence levels should add up to 100%.
Therefore, when we give our AI a street view image, it should give us something like this:
[Insert image of AI's prediction]
The darker the square is, the more confident the AI is that the image belongs to that square. We can determine a final guess marked by the pink dot by taking a weighted average of the centers of each square using their corresponding confidence levels. The higher the confidence level of a square, the closer the final guess will be to the center of that square.
Training the AI
The basis of any good machine learning project is the training data. The AI can only be as good as the data it uses to learn. Each dot on the map represents the location of a street view image that the AI will use to learn. In this case, there are about 4,000 street view images that the AI will train on, and each square contains a similar amount of images.
I will now Show a series of predictions made by the AI throughout its training in order to show its learning progress. The image on the left is the image that the AI will be predicting the location of, and the image on the right is the output of the AI. The pink dot represents the AI's predicted location using the weighted average method I described earlier, and the green diamond represents the actual location of the image.
[Insert series of images showing AI's learning progress]
At first, the AI's guesses will look very random, giving a low confidence to every box. But it will continually learn by making adjustments to itself with each training example. After repeatedly doing this many times with different images, the AI will start to recognize Patterns and features in the images that will help it to determine the location of an image. Eventually, it will get to a point where it stops making progress in its learning, and that's when we will stop training the AI.
For anyone interested, the way We Are doing this is by using a convolutional neural network and a method called feature extraction. I won't go into Detail about how these work, but I'll leave useful resources in the description where You can learn more about these if you wish.
Using the AI to Play Geoguesser
Now there's only one thing left to do, which is to use the AI to play Geoguesser, with the goal being to beat the average human score of just under 10,000. I decided to play five games to get an idea of how the AI performed on average.
[Insert images of the five games]
The first game I'll show was the best of those five. But before I do, if you want to play along, take a moment to look at these five images and try to determine the location that these images were taken at. Then you can compare how you do to the AI.
[Insert image of first location]
This was the first location that Geoguesser had put us in. As you can see, the area is pretty flat and dry. I decided that moving around a little bit was fair game to try and get the best picture possible. Once I found an image that looked good, I took a screenshot of it. I gave the image to the AI to predict its location, and this is what it gave us:
[Insert image of AI's prediction]
As you can see, there are a lot of darker boxes in the center of the United States, showing that the AI is confident that it's somewhere in this area. Using the weighted average of these boxes and their corresponding confidence levels gives us a guess of a latitude of 39 degrees and a longitude of negative 100 degrees. I then put these coordinates into Google Maps and try to get as close as I can to that location on the Geoguesser map by slowly zooming in on both maps. The final guess ended up being pretty close at just 153 miles away, earning 3,700 points for this round. And as we can see, we did get it in the correct state of Kansas.
Since we're trying to beat 10,000, we only need 2,000 points per round to beat it. So getting 3,700 on the first guess is a really good start.
Results and Analysis
After five games, the AI had an average score of just under 15,000 points per game. This is noticeably better than the average human score of just under 10,000 points per game. We were able to create an AI that plays Geoguesser better than the average human by finding a design that worked and collecting good training data.
The AI's ability to differentiate between different types of images and find the general location of images was impressive. However, there were still some challenges that the AI faced, such as predicting locations close to the edges of the United States and misclassifying certain areas, such as Arkansas.
Future Possibilities
While we focused on creating an AI for the United States map on Geoguesser, this could be done for other countries, continents, and even the entire world. It would be interesting to see if an AI could outperform the average human on Geoguesser for the entire world.
Conclusion
In conclusion, we were able to design an AI for Geoguesser, train it, and use it to play the game. The AI performed better than the average human, showing the potential of AI in gaming and other applications. As AI technology continues to advance, we can expect to see more impressive feats from these intelligent machines.