AI Movement Behaviors in Unity

Unity
C#
ML-Agents
AI Movement Behaviors in Unity

This project serves as a practical demonstration of fundamental and advanced AI concepts for video games, implemented in the Unity engine. It includes classic algorithms like flocking for emergent group behavior, formation movement for coordinated unit tactics, and modern techniques using behavior trees and state machines. A key component is the integration of Unity's ML-Agents to train a neural network for complex agent decision-making.

My Contributions

Flocking Algorithm

Implemented a classic flocking simulation where agents follow rules of separation, alignment, and cohesion to create emergent, natural-looking group movement.

State Machine for Animation

Developed animation controllers using finite state machines (FSMs) to manage transitions between different agent animations based on their current behavior or state.

Behavior Trees

Designed and implemented complex agent logic using behavior trees, allowing for modular and scalable decision-making for non-player characters.

Neural Network Training

Utilized Unity's ML-Agents toolkit to train a neural network, enabling an agent to learn and adapt its behavior through reinforcement learning.

Formation Movement

Created a system for groups of agents to move in coordinated formations, maintaining their relative positions while navigating the environment.

Advanced Perception Systems

Implemented perception exercises for AI agents, allowing them to detect and react to their environment and other agents in a more realistic manner.