Marble Racing Bot

If you’re an efficient person like me (the unwitted eye might perceive it as lazy) you’re always looking for shortcuts to increase productivity. One of the easiest and most effective ways to increase productivity is automation. Introducing automation to any task allows a users to take their eyes off the task and direct their attention elsewhere. You might be familiar with things like autohotkey which can be used to automate the entry of data into excel spreadsheets or, in some circumstances, *cough* Neverwinter Online *cough*, be used to play games without the presence of the player.

This type of automation in games has become known as botting. The use of these bots is quite common in games that require a lot of time to receive rewards. The popular MMORPG World of Warcraft has quite a large botting community built around it. Botting is not popular with developers who claim it is inherently detrimental to the gaming experience. Using a bot is definitely an unfair advantage. Someone who plays the game for 8 hours a day should, in theory, reap more rewards than the person who loads the bot and lets it run for 8 hours a day while at work. You could also argue that this “busy work” that is easily botted doesn’t constitute a gaming experience and is just a time sink that rewards players who dedicate the most time (and in World of Warcraft’s eyes, subscription money) to the game.

The cat and mouse game botters and developers play is one of the most fun elements of botting and, in some circumstance, can be more fun than the game itself. A historical example is the lawsuit World of Warcraft developers Blizzard levied on an early World of Warcraft bot wowglider. Other programs, like honorbuddy, have come online to bring botting into the current decade. Whether you feel botting is detrimental to the gaming experience or not, it’s impossible to ignore the objectivity of the science behind it. Looking at this process with our white hats on we can glean plenty of information about computer science, artificial intelligence, and social engineering.

The game marble racing on is an interactive gaming experience that allows players to assume the role of a marble racing down a hill. As many as 700 players have been seen rolling down these hills with hopes of achieving marble racing fame. You are awarded points and the game keeps track of your score on a leaderboard that is displayed after every race.


Every bot must have a vector it exploits to be useful to the player. In the case of marble racing, a player is rewarded points for every race completed independent of if the player places or not. A player could come in dead last and still be awarded points. This allows an individual who can play 24/7 in this game of chance to naturally have an advantage.

The game is simple to play. When given a cue, players enter the command “!marble” in the twitch chat which enters their representative marble into play.


This is the only element of the game. The rest is fanfare and trash talk between the users. Easy enough to automate, right? Somewhat. The developers have included countermeasures to prevent this kind of unethical play. This is where the cat and mouse game of botting becomes apparent. On the left side of figure 1 below, highlighted in the red boxes, you see the cue used to tell the users the game is accepting input. The cue “Enter marbles now!” is flanked by several lines of “—————–“. This is for aesthetic reasons so the users know when to input their marbles. When there are 700 users in chat, a message without these borders might be missed. It also serves an anti-botting purpose.

Figure 1

By opening an IRC client and connecting to the twitch servers the botter can gain access to this chat without actual having the game open in twitch. For this exercise I used mIRC because it has preferable scripting functionality. Often the botters first attempt is to use a simple script to look for a certain line of text (“Enter marbles now”) and return a line in the chat (“!marble”). This can be accomplished by using the following script in mIRC.

on *:TEXT:*Enter marbles now!*:#marbleracing:{

The syntax for the above command is simple enough:

“on” is equivalent to “when an action happens”, “:TEXT:” specifies we’re looking for a specific line in the chat identified as “*Enter marbles now!*”,  “:#marbleracing:” specifies the exact channel we want to look for the text, which in this case is the #marbleracing channel of irc.

We could then include the following line to send out our message

msg #marbleracing !marble

“msg” specifies we want the script to send a msg, “#marbleracing” specifies the specific channel the message is to be sent, and “!marble” is the message we want to send.

One the right side of figure 1 above we can see the user Cody___ using this simplified command. It unfortunately puts the message within the lines of dashes following the cue. This is indicative of bot use because this lines of dashes are milliseconds apart from the cue and it’s humanly impossible to type a command in this fast. The developer can use this technique to identify botters who use this simple script. Once a user’s command appears with the dashes, a moderator can mute this player or put him or her on a watch list.

The next step our botter would have to take in this cat and mouse scenario would be to include a wait command in the script to prevent the telltale sign of appearing within the dashed lines. By including the “timer” command we can make the bot wait before sending the message

.timer 1 4 msg #marbleracing !marble

The “.timer 1” lets the bot know we want to start a timer, “1” specifies what timer in case we want to have more than one active in our script. “4” specifies the number of seconds to wait.

This script is far less conspicuous and doesn’t immediately flag the user as a bot. However, when dealing with automation one’s bot only has to be more effective than the next most effective bots. This kind of cutthroat bot vs. bot dynamic is present in Wall Street in the form of high frequency trading and the bot that recognizes when it’s walking into a trap has a higher chance of walking away unscathed. Twitch’s bots are far less sophisticated but they do exist and this channel was using one that can identify automation. In this case a bot in the channel can see a user replying in the exact same interval after the cue several times and automatically mute that player, leaving them unable to play.

The next step would be to add randomness to the script to appear more human. This obfuscation is critical in gaming since players can tell when they’re playing against a robot with movement or logic that is not human.

Luckily mIRC has randomness elements we can take advantage of:

.timer 1 $r(3,14) msg #marbleracing !marble

By appending “$r(3,14)” to the code we’ve made our wait time random so we no longer trigger the other bot.  “$r” specifies we want the variable to be random and “(3,14)” is the range in seconds. The bot now waits between 3 and 14 seconds randomly before posting.

At this point we have a fully functioning bot that can play the game indefinitely without being automatically detected. However, we can further increase randomness and obfuscation by introducing more elements to the script.

Players can append what type of marble they want to race with. Options include planets, colors, basketballs, and all sorts of other fun cosmetic twists. Since players normally choose to specify what marble they’d like to use, it only makes sense if our bot chooses a style as well. We can take it one step further and randomize which marble the bot chooses by including a random variable function in the script. Our final script looks like this:

on *:TEXT:*Enter marbles now!*:#marbleracing:{
 Var %random = $rand(1,30)
 If (%random == 1.) .timer 1 $r(3,14) msg #marbleracing !marble pool9
 If (%random == 2.) .timer 1 $r(3,11) msg #marbleracing !marble eyeball
 If (%random == 3.) .timer 1 $r(3,11) msg #marbleracing !marble basketball
 If (%random == 4.) .timer 1 $r(3,11) msg #marbleracing !marble jupiter
 If (%random == 5.) .timer 1 $r(3,11) msg #marbleracing !marble pool9
 If (%random == 6.) .timer 1 $r(3,11) msg #marbleracing !marble neptune
 If (%random == 7.) .timer 1 $r(3,11) msg #marbleracing !marble 
 If (%random == 8.) .timer 1 $r(3,11) msg #marbleracing !marble black
 If (%random == 9.) .timer 1 $r(3,11) msg #marbleracing !marble pink
 If (%random == 10.) .timer 1 $r(3,11) msg #marbleracing !marble imGlitch
 If (%random == 11.) .timer 1 $r(3,11) msg #marbleracing !marble earth
 If (%random == 12.) .timer 1 $r(3,11) msg #marbleracing !marble
 If (%random == 13.) .timer 1 $r(3,11) msg #marbleracing !marble
 If (%random == 11.) .timer 1 $r(3,11) msg #marbleracing !marble Kappa
 If (%random == 15.) .timer 1 $r(3,11) 
 If (%random == 16.) .timer 1 $r(3,14) msg #marbleracing !marble pool9
 If (%random == 17.) .timer 1 $r(3,11) msg #marbleracing !marble eyeball
 If (%random == 18.) .timer 1 $r(3,11) msg #marbleracing !marble basketball
 If (%random == 19.) .timer 1 $r(3,11) msg #marbleracing !marble jupiter
 If (%random == 20.) .timer 1 $r(3,11) msg #marbleracing !marble pool9
 If (%random == 21.) .timer 1 $r(3,11) msg #marbleracing !marble
 If (%random == 22.) .timer 1 $r(3,11) msg #marbleracing !marble
 If (%random == 23.) .timer 1 $r(3,11) msg #marbleracing !marble black
 If (%random == 24.) .timer 1 $r(3,11) msg #marbleracing !marble pink
 If (%random == 25.) .timer 1 $r(3,11) msg #marbleracing !marble imGlitch
 If (%random == 26.) .timer 1 $r(3,11) msg #marbleracing !marble earth
 If (%random == 27.) .timer 1 $r(3,11) msg #marbleracing !marble
 If (%random == 28.) .timer 1 $r(3,11) msg #marbleracing !marble
 If (%random == 29.) .timer 1 $r(3,11) msg #marbleracing !marble tree
 If (%random == 30.) .timer 1 $r(3,11) 

It isn’t the prettiest script and could be simplified to a degree. What we have now is an array of options the script can choose when it sees the “Enter marbles now!” cue. When the cue is seen the script randomly chooses a number between 1 and 30 and then runs one option then waits and repeats when the cue is seen again.

The final script randomly chooses a marble style, furthering the appearance of human behavior. There are also to lines which do nothing when selecting. When human players play they don’t participate in every single game. By having our bot sit out 1 out of 15 times it becomes more reminiscent of human behavior, further disguising the automation.

This is just a small example of the cat and mouse games that go on between developers and the people searching for shortcuts. It is far from finalized, however. The perfect bot would be able to adapt to changes in the game’s operation. This particular script would fail if the game didn’t produce the “Enter marbles now” cue. That is one thing the developer might implement in the future and it’s back to square one.

As advances in robotics, artificial intelligence, and behavioral science are made, bots are bound to become more and more advanced. Eventually we might have a bot that is truly able to pass the turning test. And it might be sooner than we think.

Marble Racing:
Marble Racing in action:

Cities: Skylines Bus Depot Simulation

The game Cities: Skylines, released in 2015, allows players to take command of urban planning and simulate a various aspects of a city. A player might teak the traffic, zoning, and aesthetics that accompany real life urban efforts.

This video captures the operation of a bus depot I created in Cities: Skylines

The design incorporated a one-way design which helps traffic flow along 5 entry and 5 exit ramps the help mitigate traffic when the buses travel en masse out of the terminal and into the city.

This design is similar to the Charlotte Transportation Center and it functions in the same manner. All transfers take place in the terminal and busses and sent directly to the specified areas.

The Charlotte Transportation Center (CTC) featuring easily accesible commercial properties

In the simulated design a subway line and an elevated pedestrian footpath further increases the citizens’ reach. Shops and offices also take advantage of this high traffic area.

Pokemon Go and GIS

Pokemon Go is a phenomena the reignited the Pokemon craze in a similar way as the release of the game 18 years ago. The nostalgia bug seems to be biting everyone as people are coming out of the woodwork back into the world of pokemon to collect and battle the original 150 monsters.

This has led to many interesting geospatial developments. The nature of the game requires the user to maintain a constant GPS connection to their smart phone while the app looks for Pokemon and other interactive objects in the augmented reality of the Pokemon GO world.

Esri has its hand in the Pokemon GO pie. They had supported a project called Pokevision which used the Pokemon GO API to project Pokemon in real time as they were spawning around the world. Pokevision’s life was cut short as Niantic, the developers of Pokemon GO announced they weren’t going to support services like this.


The Pokevision website and its map interface

Users have also taken it upon themselves to start crowdsourcing geographic data at a rate that hasn’t ever been seen before. We’ve come a long way since geocaching and you’re more likely than ever to see someone walking around with their head in their phone, following a trail of digital breadcrumbs.

One of the more famous user-generated maps would the one to come out Boston. Supported by google maps and displaying to individual submissions of thousands of users, this map has become the best example of just how much data can be crowdsourced manually.

Unfortunately the map is private so I’m unable to embed it. It supports all the regular Google Maps functionality.

boston map.PNG
Boston’s Crowdsourced Pokemon Go Map

As people get more and more familiar with the geographic aspects of the game, I suspect we’ll see more projects like this emerging. Even now people are fiddling with geographic information more than ever thanks to this game. Hopefully it will bring a new generation of geographic minds into the fold.

Overwatch: The Map

12 different maps

Overwatch is game developed by Blizzard Entertainment released today, 5/24/2016. It belongs to the newly coined genre “hero shooters” which is a traditional multiplayer first person shooting where players choose skillsets based on characters instead of classes.

The story has been in development for some time and knowing Blizzard’s handiwork, it’s probably consumed a large amount of resources. I’m personally, glad to see them developing their fictional universe in a setting using real geography that we, the fans, are familiar with and inhabit.

The following are the different arenas and locales spread across the Earth:

Temple of Anubus – This is located in the famous monoment park in Giza, Egypt. It’s a fictional building but the Pyramids that shadow it and the Giza plateau it’s situated on are both very real.

Hanamura – This is a picturesque location with budding cherry blossoms and classical Japanese architecture. This fictional city itself could be any metropolitan suburb in Japan. The direct translation of Hanamura is “Flower Village”. For the purposes of our georefrencing, we’ll use Tokyo for this location since it, along with Kokkaido, are the two most famous places for viewing the cherry blossoms in reality.

Voklskaya Industries is a near-future representation of a Russian heavy industry production plant. The fictional plant converts “omnium” into “Svyatogor”, mechanized fighting exoskeletons. Any large industrial center with infrastructure and access to Siberia can fill the role of this town for georeferencing purposes. Novosibirsk is the biggest city in Siberia with 1,5 million people in 2012 [1]. For the purposes of our georeferencing, we’ll assume Novosibirsk grows into the industrial powerhouse that is home to Voklskaya Industries.

Gibralter is an easy point to map. What’s interesting about Overwatch’s Gibralter is that it seems to have changed hands. In Overwatch, the former British territory serves as a base for the organization of the same name. This international Gibralter is an interesting concept and illustrates the importance of the strategic positioning that Gibralter occupies at the mouth of the Mediterrainian.

Dorado is a fictional city in Mexico. It’s set upon a sweeping bay and features a large power plant that is reminiscent of a mayan pyramid. For the sake of our georeferencing, we’re going to assume this town exists in reality by another name. I settled on Campeche, a city known for its lighted streets, mirrored in the eternally nighttime map of Overwatch’s Dorado. It’s on the Yucatan peninsula, within a the historic Mayan territory and reach of the ruins, possibly providing the local inspiration for its fictional power plant. The Bay of Compache is a feature of the southern Gulf of Mexico and it perfectly fills the discriptor of a sweeping bay in Overwatch’s Darado.

Route 66 is a historic highway in The United States and is the subject of many cultural creations and fanciful folklores. This highway, once known as the “Main Street of America” sweeped south and west from Chicago to Los Angeles. In Overwatch, the map features some very familiar looking canyon formations. Maybe it’s Flagstaff?

Lijiang Tower is a beautiful skyscraper set in a luminescent, futuristic, East Asian city. It has a real life counterpart, a Lijiang city, in the Yunnan province of southwestern China. The beautiful Lijiang Tower in Overwatch might be in this relatively quaint Chinese town. Currently, in real life, hovering around 1.5 million people, it is a relatively small player in the game of Chinese Metropoli. How this rather humble city becomes the bustling spaceport city with Lijiang Tower nestled in the center is still yet to be seen.

Ilios is a lightly colored seaside town complete with scenic cliffs and ocean breezes. It’s fictional, not appearing on any world maps of modern or historic Earth. It likely is inspired by the many islands of the Aegean sea. Illios, meaning “sun” in Greek, is definitely an appropriate name for this Island. It may be a reference to the legendary city of Troy; Illion. This would put this map in modern day Turkey which contradicts the Greek flag adorning the map. For mapping purposes this is what we are going to assume.

An appropriately geographically named map, Nepal, makes an interesting appearence. How to a group of sentient robots who have experienced spiritual awakening, it has one of the most unique backstories of the map. It’s name, however, is quite vague. It’s a monastary tucked away in the Himylayas. These most famous real life counterpart would arguably be Tengboche a village over 12000 feet in altitude and home to a Buddhist monastery. It’s located in the northwest region of Nepal and is prone to earthquakes. My research hasn’t show any current robot residents so Overwatch’s iteration might still be some time in the future. Let’s just hope the new electronic denizens are shock resistant.

King’s row is a street in a what appears to be a futuristic London. A high tech Big Ben can be seen in the distance and it’s sporting the flag of the United Kingdom.

Numbani, hoiwever, isn’t as easily identified. Situatied along Africa’s west coast, it could be the future iteration of a number of cities spanning Ghana to Nigeria. The flag that accompanies the map is not a real-world flag. It could be a city state. We’ll assume it is a futuristic Lagos. It could also be a futuristic Accra. It could be a new city state entirely.

Hollywood is the easiest location to georeference. It exists in the real world and the world of overwatch.