TankHerding
This is the homepage of my CPSC 426 project at UBC.
= Abstract =
The goal of this project was to create a system in which teams of autonomous tanks interact with one another and their environment on a finite 3d terrain. Interaction with the environment is handled by a simple force-based physical model. Tank behavior is controlled by a decision making algorithm which outputs what sort of modification the tank should make to its current state. Concepts of flocking also play a role, since tanks have "perception", which restricts their knowledge of the world to the things they can see.
= Rules =
In this simple simulation, the only independant parameters that tanks have are a thrust vector (applied force), and whether or not the tank fires a bullet. Thus, tanks do not have a rotating turret, as the name might suggest. They can only fire in their direction of movement. Tanks also have perception, which includes their line of sight, defined by a conic field of view, and a proximity detector (for things like collision avoidance), defined by a radius.
= Features =
Given the limited time, and unlimited possibilities, I was often unable to implement the features I wanted to implement.
== Done ==
- Physical force engine with true gravity. Using forward euler for integration.
- Oriented bounding boxes / spherical bounding boxes for collision detection
- Tank perception
- Restricts search area to proximate targets only
- Front field of view cone
- Varied tank behaviors:
- Seek a target
- Orient towards a target
- Avoid obstacles (and other tanks)
- Many more (see paper on steering behaviors)
- Discrete heightmap loader from pgm greyscales
- Wavefront obj loader
- Player controlled tanks
- Easy addition of foreign objects
== TODO ==
- Implement real friction (currently using "drag coefficient", similar to damped spring motion)
- Embed a scripting language for AI implementation and clean up design of Behavior class
- Implement collision detection with oriented bounding boxes
- Take into account lack of visibility through terrain (currently conic fov sees tanks through the terrain!)
- Fix error reporting and logging
- Interpolate normals in 2D for a less jagged terrain look and a smoother tank motion
= Deliverables =
The bzipped tarball:
== Videos ==
Note: some of the tanks in these videos are not autonomous. Often the red tank is being controlled by a human.
Some to illustrate the physics engine.
An illustration of the red tank's , in which blue tanks turn white if they are visible through the field of view, and magenta if they are ''visible'' through proximity.
Demonstration of position seeking of multiple tanks, and their ability to avoid with one another. Collision results in termination of both tanks.
An attempt at some sort of sequence. Yes, the AI is horrible. Sorry - not enough time.
= References =
- [http://www.red3d.com/cwr/boids/ Boids - Craig W. Reynolds]
- [http://www.red3d.com/cwr/steer/ Steering Behaviors For Autonomous Characters - Craig W. Reynolds]
3. Vehicles: Experiments in Synthetic Psychology, Valentino Braitenberg
CategoryProject