Category: Games


Neuro Evolving Robot Operatives

One of the interesting applications of the NEAT algorithm is to generate artificial brains via the use of Artificial Neural Networks.  These are approximations to the way that our brains are wired up, consisting of a bunch of neurons that have firing thresholds, and synapses that link the neurons together.  When you add in some sensor neurons that feed the network with location, sight, sound etc, the artificial brain can, by modification and distortion of the signals across the network, fire signals to effector neurons, which can control an agents behavior, movement, speech etc.

Of course if you randomly wired together a set of neurons and synapses, real or artificial, the ‘brain’ created would most likely do nothing or work itself into a crash state.  However if you start with a very small amount of neurons and links, then slowly add more under a training regime, you can get some startlingly intelligent behavior – in precisely the same way as nature develops embryos to thinking creatures.

Another correlation between real world and artificial embryo development is that the artificial neural networks are stored as a DNA string, which is unpacked to create the network.  The most interesting behavior is shown when individuals with successful brains reproduce with other fit individuals.  In this manner it is possible to create networks that have the best of both parents, and over enough generations it’s possible to create networks displaying highly complex behavior.

The video game N.E.R.O. (Neuro Evolving Robot Operatives) has been created to show how these neural networks can create individual and team behaviors in a virtual world.

The general idea is to take untrained robots (which will make generally random actions) and reward individuals which display promising behavior.  These then are more likely to reproduce in the next generation, and over time the promising behavior gives way to the operatives taking actions which could easily be mistaken for human play.

The NERO engine has been open sourced, so it’s possible for anyone to develop their own AI’s, or present new challenges for existing agents.

This technique has not, to my knowledge, been used in any commercial games to date, although given that it allows characters to develop over time could be used to create games that are able to endlessly adapt to the players style, presenting new challenges within every game.

Subversion RIP

It’s a great shame to hear that Introversion Software, a London based indie game developer, have decided to put on hold Subversion, a game of great interest to anyone involved in PCG.  The company has decided to take some of the technology they built for the project and focus on another game called Prison Architect, which should be good news as they’ll undoubtedly be making sensible commercial decisions.

There is a full interview here, and has many topics worth considering for an indie developer, or anyone involved in PCG.

  1. Worlds and Levels created by PCG techniques are, more often than not, really boring to play.  This is a biggie – you can make a computer generate the most beautiful landscapes, plants and water features, but this stuff has a tendency to repeat itself to infinity, which is no fun at all.  Even the makers (well publishers) of Elite limited the number of galaxies from the possible 256 million to only 8, on the basis that the player would lose all interest in the ridiculous scale.  Successful PCG games like Minecraft ensure that the players can design their own unique architecture over the world of mathematics, this generates interest for other players.
  2. Making something more realistic does not make it more fun.  Everyone knows that the KISS (keep it simple stupid) mantra is the most important in UI, UX, product, game, or pretty much any other design, however it’s very difficult for an artist to follow this simple rule, even more so when there is an elegance to making the environment fully integrated to the point otherwise designed laws naturally emerge.  I’ve been following Introversion for a long time and I can see the quandary they would have been in: as proponents of PCG as a necessity to make up for lack of human level designers, it became more tempting to generate everything well past the position of utility.
  3. It’s a highly complex (possible unsolvable) problem to simulate architecture that would otherwsie been created by a human (or even animal) builder.  The most immediate uses of PCG may be as a tool to generate ideas that human (or crowd of) designers then curates by selecting and modifying into something useful.

The direction of my research is in creating software agents that can assist human designers (or crowds of them) generate more interesting levels, either by evaluating the raw creations of PCG, or perhaps by simulating human behavior in shaping their environment, or even learning how designers create content and replicating these fuzzy techniques.  Introversion software have been pioneering these techniques for many years, and so I wish them the best in commercial success with Prison Architect so they have more time to play with creating virtual worlds.

Jetpack Joyride

I’ve been a game player for many years, although these days don’t have the time to sit down for hours at end in front of an XBox or PC, so now my gaming is limited to game ‘snacks’ generally on my iPhone.  This is a trend is causing a fair amount of turmoil in the games industry, as the large development houses who employ hundreds of designers, programmers and testers to build large games are finding that gamers are moving to mobile and social games and taking their revenue with them.

Mobile and social games are competing in a crowded marketplace, and have to reduce development costs to a minimum in order to survive.  A hugely successful way of doing this is to make use of PCG to develop game infinite game content, another is to get the players to generate their own content for friends (more on this another day).

A great example of PCG in games is Halfbrick Studios Jetpack Joyride, available on the Apple App Store.

The player has managed to steal a jetpack from a secret development facility, and needs to find a way out.  In this case there are a number of hazards including rockets, zappers and laser beams, however rather than these being placed by a human designer in increasing difficulty, the game itself decides when and where to introduce the dangers based upon a number of rulesets.  While this could become repetitive, the game developers have made use of fast pacing, a quick restart, a variety of powerups, varying challenges and in game currency to keep players interested.

As independent game studios are on the increase I’m sure we’ll see a lot more of PCG content on mobile and social gaming platforms.

AI Test Environment

A test bed is needed to try out various AI virtual world generation techniques.  To this end I’ve put together a little system that consists of:

  • A server, which generates a map (very simple right now) and manages a number of simple AI’s (currently looking like Medusa)
  • A dispatcher, which passes messages between the server and clients
  • A client, which allows any number of players to join in on the fun from different locations.

The system has been built so that an AI can join in as a player, we can then run more complex AI’s from the same or other servers.

At the moment this uses images from a computer game I enjoyed many years ago, these will be updated shortly as the rest of the game develops.

With 2 players:

Source code to follow once I’ve got the right images in there.

Software agents are as much a creature of their environments as all creatures on earth are. We have been created by constant evolution brought about by surviving our environment, competing with other entities and succeeding to procreate new generations.

In order to create and evaluate software agents we need to create environments to test them in.

  • International Aerial Robotics Challenge – there have been six challenges set to date of increasing complexity, it’s absolutely amazing what the state of the art in robotics can achieve. The last solved challenge asked teams to build a completely autonomous drone which, without prior knowledge of the environment, flew into an unmanned nuclear facility, identified and located the control room, and sent pictures of the control instrumentation out to a second unmanned drone.  The next challenge is to enter an unknown territory and locate a USB key holding sensitive data:
  • The DARPA Grand Challenge – creating a driverless car which will traverse across unknown terrain, which has been successfully with a variety of different technologies, all of which worthy of further research.  The current challenge is set in an urban environment with other motor vehicles to be successfully negotiated.
  • The NASA Centennial Challenge – to find and retrieve samples of scientific interest in an unknown environment
  • The RoboCup challenge, which requires teams made up of autonomous robots to win a league against other robots.  The organizers are attempting to lead the way for a robotic team to beat the last winners of the World Cup by 2050.  They’ve got a long way to go:

Of more immediate interest are virtual challenges as these are more accessible for direct testing.

  • The Google AI Challenge – this is the third challenge that asks entrants to submit AI bots to compete with each other in virtual worlds, and the first I have entered.  The first year (Winter 2010) was inspired by Tron, competitors needed to take control of a light cycle and cause the other players to crash.  The second was based upon the game PlanetWars, developed by Galcon, competitors needed to take over planets given a number of spaceships.  This years is based upon ants, and competitors need to develop a hive mind which will grab the most food at the same time as destroying other ant hives, all of which takes up valuable resources.  Entrants build AI bots in pretty much any language they like, then submit them to the competitions central servers to be pitted against other agents.
  • Core Wars – A game that could only be thought up by a computer scientist.  Build a set of instructions which are let loose in a simulated computer memory stack, which then compete against other instruction sets to take over the whole memory.  Sounds very geeky but some ingenious entrants.
  • Mario AI Challenge – using an adapted version of Super Mario 3 for the Nintendo, build a software bot that can complete any level thrown at it.  As interesting as the entrants are, the game environment (Super Mario Infinite) is an excellent example of Procedurally Generated Content (more on this later).
  • The StarCraft AI Challenge – StarCraft is a real time strategy game that is celebrated as one of the most hectic and evenly balanced computer games of all time.  In Asia, specifically Korea, this is an international sport.  Most video games can be seen as challenges for AI, with a bot taking over the role of the human player.  All that is needed is an API so that the AI can understand what is happening in the game and relay instructions back to the game (although in some cases a lack of API can be overcome by screenscraping, and this in itself is an area of research as in some real world cases it may be easier to translate a video output than retrofit an API).  The interestig thing about StarCraft is the wealth of information that needs to be processed, the number of available strategies (pretty much infinite) and the real time nature of the game – this is far more complex than chess, although with the luxury of being able to ponder the next move for half an hour.  Here’s a video of a software AI playing (and beating) one of the top ranking players worldwide.
  • Many games open up API’s to allow AI builders to modify or completely recreate AI’s that play against the human player – one very sophisticated and challenging example is Civilization IV, and develop fans have taken to building an open source version called FreeCiv, which allows whole worlds to be built with independent AI’s for those with the time.

Pretty much every video game genre from poker through space and trading simulations, role playing games to first person shooters and platform games, can be used as a test bed for developing and evaluating AI techniques.

Bristol Game Jam

Bristol is a wonderful place for digital creatives – it’s a bit of a surprise that the games development scene seems over the last few years to have quietened down a bit.

But that doesn’t mean it needs to stay quiet.

To stimulate the scene (and have some fun) a bunch of Bristol game developers, sound and graphics designers got together to stage the Bristol Game Jam event.  Held at Pervasive Media Studio, organised by Red Wasp Design with a few helping hands, and in cooperation with the ExPlay festival, a bunch of us got together to build a game in 24 hours.

Except that we got together on Friday night, whereupon we were given the theme for the games (Mirror) and then decided that food and beer was the way to generate some interesting ideas.  That ended at about midnight for most of us, and there were a few sore heads on Saturday morning.  The time limit was 7pm Saturday evening, so in effect we had 7 hours to put together a working game.

Amazingly all four groups achieved this, and by the end of the day there were five playable games.  Granted, none were going to win any awards (although given more time who knows) it was very inspiring for everyone involved, I think a lot of relationships were formed and there was a general buzz about the day which everyone took out with them on Saturday night.

Our team put together a very simple game based upon Jason (of the Argonauts) trying to reflect Medusa’s gaze back before being hit himself:

Our team included Jae (DJ Task) and myself programming, Tessa providing the visuals and 3d models (you don’t want to know what it looked like before the visuals) and Dave (founder of Echoic Audio) producing the audio which really made the game.  Dave has put a far better post up here to describe the day.

Great fun, and hopefully the start of many more Game Jams and the opening up of the game scene in Bristol.

Source code on GitHub.

Moovaders

A simple Space Invaders clone put together as an learning exercise.

The name is a reference to a company I used to work at, I was going to give this to the team when I left, but somehow never got around to it.

I was lucky enough to get the music to be produced by Armin Elsaesser, an award winning games music writer:

http://soundcloud.com/arminelsaesser

The things I learnt:

- How to use the prototyping language Processing (www.processing.org).  Worth checking out.

- A way of making each invader unique with a fractal texture generator

- The perlin noise function for generating smooth random moves (the saucer)

This was a lot of fun to develop, and is quite fun to play as well!

Source code can be found here if you’d like to play or see how it works:

https://github.com/opposable/Moovaders

Follow

Get every new post delivered to your Inbox.