Biogenesis

Fight – Collect – Upgrade

AI in Biogenesis

Leave a comment

This is the part of computer gaming that most people both think a lot about and don’t think a lot about. By that I mean that everyone will mention exception Ai in a game, saying such things as “It seems like the AI is learning from by actions on what to do.” or like “They set up an ambush for me, this must be top of the line behaviors!” What most people don’t talk about, is how the system is actually setup. Consider the fact about Pacman. Many first time players playing Pacman will make remarks that the ghosts are setting up ambushes or leading the players into a trap. In truth, the ghosts are simply follow a simple rule of which turn to take. Though seemly simple, this AI creates a great user experience. This is the goal we had when creating Biogenesis’s AI, simple enough yet a great experience.

To break down the AI we have three tiers as follows:

  1. Group Behaviors – The planning of all the creatures
  2. Creature Behaviors – How each creature carries out its part
  3. Pathplanning/Actions – How the creature moves around

Group Behavior

This is the part of AI that works as the name says. It focuses on the group as a whole. Imagine this as a fellow player who is combatting you. Like an actual human player, he forms strategies, and weighs costs in certain strategies.

How is this done? For the group, we utilize a system call goal-oriented behaviors. This means that to find the best strategies, the AI calculates its goals based of custom methods made by us. Once it has its goals in order it then assess its strategies to see which one satisfies its goals the best. Once this is accomplished, the group entity then conveys this information to the team, which leads us to the creature level.

Creature Behaviors

At this point each creature has been given a task to full fill, but how does it carry it out on its turn? To do this we go to the creature level. At this point the creature follows a system called a Finite State Machine (FSM). This contains a list of states that the creatures transition into. For instance the group behavior might tell a Avian to look for DNA so the creature first goes to the move to DNA state. Once it gets to the DNA, the creature goes to the use DNA state. The creature runs this until the group behavior modifies the state machine for the creature to use,

Movement and Actions

So now the creatures have the state and along with it the action to perform. This is the final and bottom most tier, movement. To accomplish movement is done using traditional pathfinding technique of A*. However, because we have different types of creatures, certain tiles cost more or less depending on creatures. For instance if you are a mammal and cannot cross water tiles, then the cost of the water tile is infinite, however being a fish makes the water tiles cost normally but then grass tiles are slightly discouraged because of the damage over time on staying out of water.

Performing actions are also done at this point. To do things such as using DNA effectively and attacking, use various learning plans and analysis to make the best decision.

Conclusion

In all we hope the AI for Biogenesis provides an interesting and entertaining challenge for players. The end goal will be for players to believe that the AI does something or remembers something that it actually does not.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s