A behavioral animation simulating a prey and predator in a marine environment. The AI of the fish includes two senses (sight and hearing) and a knowledge representation based on perceptions. The demo also contains a quasi-game where you can control the cod and try to avid the shark. Coded in XNA/C# with a basic skeletal animation done in Blender.
Download a detailed description of this demo
In this demo I wanted to investigate the result of a combination of a sensor system and an awareness model to mimic the prey-predator behavior in this environment. We take into account the vision, which is relatively limited in an underwater environment, and mechanoperception provided by the lateral line of the fish, that can detect vibration and hence movement and sounds. This last sense can extend its range farther than sight and is used by predators to identify
possible prey before actually spotting them.
This demo doesn't focus on an accurate physical simulation or animation but implements a simple scenario where a prey fish will actually try to escape an attacking predator. The success of this action will depend on the ability of the prey to detect the predator before it attacks, as if the prey spots the predator from a distance, it could escape. The initial positions of prey and predator are randomly chosen and the final outcome is not predefined.
The detection of a predator is based on a finite state machine model to take that takes into account the awareness level of the prey. This awareness level will influence the future perceptions and actions of the prey, e.g. if the prey detects something unusual in an area, it will not approach that area even if it cannot clearly detect a predator.
The 3D models of shark and fish used are taken from Tuocan virtual museum and I added a very rudimental skeletal animation for swimming/biting using Blender 3D.
- Animated 3D models in a marine environment
- Multi-agent environment, with agents modeled as finite state machine
- Sensors have field of "view" with different resolution
- Stimuli generated by the sensors build the agent knowledge base that will influence the behaviour
- Various factors affect sensors: distance, angle, speed, obstacles
- Different scenarios (1 vs. 1, 1 vs. many, player vs. computer)