Video Games Ai Cheats

by Harini Janakiraman

Let’s face it, AI is everywhere. A face-off battle is unfolding between Elon Musk and Mark Zuckerberg on the future of AI. There are some that demonize it. And some whose utopian views claim that AI could almost be God-like in helping humanity. Whichever side your views tilt, AI is here to stay.

“With artificial intelligence, we are summoning the demon.” — Elon Musk

A new AI innovation aims to stop cheating in multiplayer video games Computer scientists from the University of Texas at Dallas have created a new cheat-detection system that can be used for any.

  1. Is absolutely needed for most modern day video games. If you aren't playing against an opponent, then you are probably playing against A.I. Bots of some kind. Outside of computer-controlled enemies, games love to saddle you with computer-controlled allies as well. At best, dumb A.I. Is a minor annoyance.
  2. To tackle this, video game publishers have been trying to fight the rising tide of online cheats. However, the rise of the Internet has resulted in the ability for cheats to be spread widely, incentivising developers to take a heavier hand towards moderating cheater in online communities.
“Fearing a rise of killer robots is like worrying about overpopulation on Mars.” — Andrew Ng

If you’re excited to dive right in and tinker with AI, then games are a great place to start. They have been the go-to testbed for AI. But before jumping in, here’s a little bit of history on how game programming has evolved through time.

The History of Game Programming

Game programmers used to use heuristic if-then-else type decisions to make educated guesses. We saw this in the earliest arcade videos games such as Pong and PacMan. This trend was the norm for a very long time. But game developers can only predict so many scenarios and edge cases so your bot doesn’t run in circles!

Game developers then tried to mimic how humans would play a game, and modeled human intelligence in a game bot.

The team at DeepMind did this by generalizing and modeling intelligence to solve any Atari game thrown at it. The game bot used deep learning neural networks that would have no game-specific knowledge. They beat the game based on the pixels they saw on screen and their knowledge of the game controls. However, parts of DeepMind are still not open-sourced as Google uses it to beat competition.

The Democratization of AI

To avoid concentrating the incredible power of AI in the hands of a few, Elon Musk founded OpenAI. It seeks to democratize AI by making it accessible to all. Today we shall explore OpenAI Gym and the recently released Universe, which is built on top of Gym.

OpenAI Gym provides a simple interface for interacting with and managing any arbitrary dynamic environment. OpenAI Universe is a platform that lets you build a bot and test it out.

There are thousands of environments. They range from classic Atari games, Minecraft, and Grand Theft Auto, to protein fold simulations that can cure cancer. You can create a bot and run it in any environment using only a few lines of Python code. This is too awesome not to try!

Project (1 Hour)

We are going to build an AI Game Bot that uses the “Reinforcement Learning” technique. I’ll explain that later. It will autonomously play against and beat the Atari game Neon Race Car (you can select any game you want). We will build this game bot using OpenAI’s Gym and Universe libraries.

Step 1: Installation

Ensure you have Python installed, or install it using Homebrew. You can download a dedicated Python IDE like PyCharm or iPython notebook. I like to keep it simple and use Sublime. Finally, install Gym, Universe and other required libraries using pip.

Everything in Universe (the environments) runs as containers inside Docker. In case you don’t have it already, install and run Docker from here.

Step 2: Code the Game Bot

The Game Bot is coded in Python, so we start by importing the only two dependencies needed: Gym and Universe.

For this Game Bot, let’s use my favorite childhood game, Neon Race Cars, as the test environment. You can find a complete list of other environment/games you can choose from here.

Video games ai cheats age of empires 2

Universe lets you run as many environments as you want in parallel. But for this project, we will use only one.

Reinforcement Learning

Now we add the game bot logic that uses the reinforcement learning technique. This technique observes the game’s previous state and reward (such as the pixels seen on the screen or the game score). It then comes up with an action to perform on the environment.

The goal is to make its next observation better (in our case — to maximize the game score). This action is chosen and performed by an agent (Game Bot) with the intention of maximizing the score. It’s then applied on the environment. The environment records the resulting state and reward based on whether the action was beneficial or not (did it win the game?).

Now we can retrieve the list of observations for each environment initialized using the env.reset() method.

The observation here is an environment-specific object. It represents what was observed, such as the raw pixel data on the screen or the game status/score.

The next step is to create a game agent using an infinite loop, which continuously performs some action based on the observation. In our bot, let’s define a single action of repeatedly pressing the up arrow (Silly bot! Feel free to evolve it to a complex one…). Action here is defined by the event type (KeyEvent), the control key (Up Arrow), and setting it to true for all observation that the agent sees.

We then use the env.step() method to use the action to move forward one time step. This is a very basic implementation of reinforced learning.

The step method here returns four variables:

  1. observation_n: Observations of the environment
  2. reward_n: If your action was beneficial or not: +1/-1
  3. done_n: Indicates if the game is over or not: Yes/No
  4. info: Additional info such as performance and latency for debugging purposes

You can run this action simultaneously for all the environments in which you’re training your bot. Use the env.render() method to start the bot.

Now you have the Game Bot ready to compete with the environment. The complete code for this basic bot as well as an advanced version is available in my Github repo here.

Step 3: Run the Game Bot

Video Games Ai Cheats

Now for the fun part: ensure Docker is running and run the bot. See it in action beating other cars or failing to do so. If it fails, keep tweaking your bot to make it beat intelligence!

Keep tinkering with AI and eventually you can unlock God Mode! #100DaysOfCode

Cheat Codes Video Games

If you enjoyed this, please clap ? so others can see it as well! Follow me on Twitter @HariniLabs or Medium to get the latest updates on other stories or just to say Hi :)

PS: Sign up for my newsletter here to be the first to get fresh new content and it’s filled with a dose of inspiration from the world of #WomenInTechand yes men can signup too!

Video Game Ai Characters



A.I. is absolutely needed for most modern day video games. If you aren't playing against an opponent, then you are probably playing against A.I. bots of some kind. Outside of computer-controlled enemies, games love to saddle you with computer-controlled allies as well. At best, dumb A.I. is a minor annoyance. At worst, it completely ruins the game you are playing. In this list, we don't rate the games based on how bad the A.I. is per se, but rather how much amusement we got out of seeing the A.I. fail. Hopefully you enjoy them as much as we did.

Doom 3

Doom 3 wasn't the easiest game out there, but that certainly wasn't because of its brilliant A.I. In fact, every single enemy without a projectile attack had one important weakness: tables. If you jumped on a table outside of a melee enemy's reach, there was absolutely nothing they could do. They would run around in circles around the table moaning and wailing, easily within your grasp, without ever attacking. Projectile enemies could always shoot you, but melee enemies never thought to just reach above their heads once in a while.


Jump Ultimate Stars was a fun Smash Bros.-style DS game that brings together popular anime characters to slug it out. It was great to play against other people, but the A.I. was so stupid that people would actually recommend that you avoid buying the game if you have no one to play with. The A.I. would repeatedly jump to its death in any stage where they were able to, many times right after a respawn. On top of this, the A.I. actually cheated at high difficulties so that you could barely ever land an attack, but you could still win by waiting at the top of the screen and doing nothing while the A.I. killed itself.


The Uncanny X-Men

Ai In Games

Video Games Ai Cheats

The Uncanny X-Men was made notable by an episode of The Angry Video Game Nerd that focused on its incredibly crappy A.I. Since there was no way to play the game with one character only, single-player mode gave you an A.I. teammate. Unfortunately, this teammate did not necessarily know to follow you when you tried to move forward in a stage, and so you would frequently get stuck as he endlessly ran into walls. It was actually far better to purposefully let you're A.I. teammate get killed so you could play the game freely.


The biggest threat in Fallout was not your enemies, but your own party members. They absolutely loved to shoot you in the back every chance they got. They also loved to trap you in walls and corners to make it impossible to continue on with the game. Strangely enough, this pattern has stayed true even in more recent Fallout releases. Try running in front of your A.I. allies in Fallout 3 and they will shoot you in the back all the same.


Old Video Game Cheat Codes

Tales of Destiny

Video Games Ai Cheats Gta

Tales of Destiny was one of the first Tales games to ever make it to American shores, but unfortunately, in the early days of Tales, the combat was a little broken. Your A.I. teammates would very frequently do nothing in battle. In fact, to get them to do anything at all, you frequently had to stand behind them so they'd wake up. Since you normally controlled a melee character in the game, this made your A.I. partners pretty much useless.