We’ve designed a multiplayer game, make no mistake, the game is fun to play against real live people from all over the world. But what if you need to get your coconut fix at 3am and there is only one other hardcore player online?

Bots are the answer. LoopyBot, BongoBot and a host of other bots will be there to fill in the empty places for any missing players from your game. They will try to play like a real player, but how do they accomplish this? LoopyBot, well all bots in Go Native!, need to be able to intelligently respond to the tasks we give them in our game and need to be almost invisible to the players playing against them. One of our design goals was to make our players not have to adjust their strategy depending on the number of bots in the current game.

So how do you get bots to play like real players? Our solution was to have real players teach the bots what to do. Any simulation, any hypothesis on how real players would react in a given situation, or any assumptions we make would make the bots feel less like an everyday Joe and more like C3PO, a clunky mechanical substitution for a real person.

The way our bots learn is simple but fairly ingenious (if I do say so myself). They are each given a random number from 1 to 10. Then they look at the situation they are in and say to themselves “how did the nth last player react to this?” where n is the random number that was assigned to the bot. Once the logs are checked the bot responds with the same result.

What is cool about the way the bot behaves is in a scenario where all the situations in your game are the same as the previous game; you will be playing against the players in the previous game. You won’t realize it, of course, and you won’t be able to cheat the system by playing a solo game after you played a game against 9 people because you have no control over the situations that are presented to you by the server. You *might* get lucky and have one repeated in your next game (a less than .4% chance) but even if you do, there is no guarantee another game didn’t overwrite your previous games responses to the situation. Plus you have no idea which 7 of the 10 responses were given to the bots to answer since, each game, the bots pick a different number.

So the bots behave like regular players in regular situations. However, Loopycubians being the gluttons for punishment we are, we implemented 1 island per game where you have to do the exact opposite of what you normally do. We could have implemented the same strategy, but because of how rare the number of times each question will appear when someone is on that island we decided to against it. It would take a long time to build a history of 10 answers and it wouldn’t be nearly as dynamic as the regular table. We tried a pair of solutions to this problem; the first had something majorly wrong.

On this particular island, called the ‘Minority’ island, the players are challenged to pick the least popular answer. Our first thought was “we’ll take the least popular answer among the last 10 replies so the bots will smartly choose that answer.” Logical yes, but in reality it just made 7 out of 8 players choose the same answer making it the clear majority. If 2 or more bots were on the Minority island, they would be stuck for an eternity! We had to introduce a bit of randomness, but logically it makes sense. If the answer the bot would normally select would be its vote for most popular that means the bot thinks any of the other choices are ‘Minority’ candidates. So the bot would choose one of the other 3 choices randomly.