Back To Home Page  
 
CURRENTLY VIEWING

ARTIFICIAL INTELLIGENCE
Check out the A.I. algorithms which I have implemented in OGRE.

Artificial Intelligence
      + Training Neural Networks
      + Hierarchical A* Pathfinding

Training Neural Networks

A neural network was used in this demo to show how decision making of computer agents can be learnt with sample data.

First, the sampling of data has to be done. The user will control the behaviour of an enemy robot, while the supposed player robot is controlled by the computer. When the supposed player robot moves around and attacks, your intelligent response as the "enemy robot" will be sampled by the A.I. system and fed into the neural network for training.

Once the sampling is done, the actual game is executed. The enemy robots will react according to the attacks of the player. The quality of their reactions is based on the quality of the training data. I did manage to get quite a good training data.

Below is a video that shows the actual game in action, after training.

Video showing how the enemy robots react to the player's actions using
neural networks only. No if-statements are used.

Notice these things about the trained robots in the video:

  1. They approach me when I'm near and stop to attack when they are in shooting distance. They approach me again when I back away.
  2. Once their HP is low, they know that they should flee instead of trying to attack again.
  3. Although they have started to flee, they try to attack me again when I'm not facing them. Once I point the cursor at them, they know that they should flee, even though I haven't even started shooting. This implies that they are especially good at back attacks.

All the responses to different situations are handled solely by a single neural network without any if-statements. Note that the zig-zag fleeing manner is procedural and not done by the neural networks.

Note: Scene setup done by Goh Cheng Teng. Neural Networks provided by Andre Tong.

Back To Top Back To Top


Hierarchical A* Pathfinding

Waymarkers are placed on the ground to serve as locations where the computer agents will move to, as they traverse through the game level. In this demo, the calculations of the paths are done using the standard A* search technique which uses heuristics to find the guaranteed shortest path to reach a certain destination. As an enhancement, the waymarkers are broken down into hierarchies so that the time and space complexities are significantly reduced.

In the video below, the robot is moving to a waymarker (represented by the flags) which the user has selected. It is doing this by moving from waymarker to waymarker, until the destination has been reached. Every time it reaches some intermediate waymarker, it will query from the pre-computed A* shortest path table to find out the next waymarker to go to, in order to reach the destination.

Video showing how a robot finds the shortest path from one waymarker to the next using a pre-computed A* search table

If the selected waymarker is in another room, the robot will find the shortest path in terms of rooms (e.g. shortest path from room A to B is through rooms C and then D etc). Then within each room, the robot will find the shortest path from door to door. This hierarchical search carries on until the robot ends up in the final selected waymarker.

Note: Scene setup done by Goh Cheng Teng.

Back To Top Back To Top

 
CG:SKEELOGY
ABOUT ME (view full)

[ SKEEL LEE ]
- Character TD
- Game Physics Programmer

(+65) 96162157
skeel@skeelogy.com
Resume is now available! Drop me a mail to request.
I am interested in character rigging, deformation and Physics simulations.
I also do R&D on the
above topics to find practical solutions to challenging problems.
MY OTHER SITES
    + Skeelogy
       (Design Portfolio)
    + CG:S's Blog
    + CG:S's YouTube
NEWS FEED
Site best viewed with
IE 6.0+ and 1024x768+.