Kakoha
AboutProjects
CVContact
EN
FR
Kakoha
EN
FR

Dhiaeddine Mokaddem

Gameplay programmer focused on systems, AI, multiplayer, VR, tools, and optimization.

HomeProjectsCVContact
dhiaeddine.mokaddem@gmail.comLinkedInitch.ioGame Jolt
All projects
Technical ExplorationGame AI

Predator AI Comparison

Implement pathfinding from scratch, combine decision systems with NavMesh, and benchmark the configured predators across one hundred automated runs.

Predator AI Comparison preview

Role

Collaborative AI and pathfinding developer

Engine

Unity

Platform

Windows

Team

5-person team

Dates

2 Oct-13 Nov 2025

Outcome

Technical exploration

What I worked on

A Unity predator-and-gazelle testbed comparing custom A* navigation with FSM and MCTS decision-making agents that use NavMesh for movement.

  • We collaboratively implemented and debugged all three approaches through shared development sessions.
  • We built A* from scratch, including automatic grid generation, node connections, costs, heuristic evaluation, open and closed sets, path reconstruction, and path following.
  • The grid generator raycasts downward onto the ground layer, then connects adjacent points when line-of-sight raycasts find no obstruction.
  • We implemented an FSM with Wait, Search, Chase, Follow, Leap, and Eat states, using NavMesh after the decision system selected behavior.
  • We implemented MCTS selection, expansion, simulation, and backpropagation, also using NavMesh to execute selected actions.
  • We automated 100 benchmark runs with ten gazelles per run and exported the results for comparison.

Technical details

Programming

C#

Supporting technology

Unity NavMesh

Development breakdown

Behind the systems

01

Custom A* navigation

Our grid generator raycasts from above onto the ground layer to place nodes automatically. Adjacent nodes raycast toward one another and connect when no obstacle blocks the segment. The search uses node costs, open and closed sets, an absolute-distance heuristic, path reconstruction, and path following written by the team.

02

FSM and MCTS with NavMesh

The FSM changes among Wait, Search, Chase, Follow, Leap, and Eat. MCTS evaluates candidate actions through selection, expansion, simulation, and backpropagation. In both cases, the decision system chooses what to do and Unity NavMesh executes the physical route.

03

Automated benchmark

Each run contains ten gazelles and ends after sixty seconds or when the scenario completes. Across one hundred automated iterations, the configured MCTS predator averaged 4.92 captures, the FSM predator 2.78, and the random-target A* predator 1.45. These results describe the complete agents, not the intrinsic quality of the navigation algorithms.

Problems and solutions

Comparing unlike responsibilities

A* solves navigation, while FSM and MCTS make higher-level decisions. A direct ranking could wrongly imply that A* itself is an inferior decision algorithm.

The results are presented as a comparison of complete configured predators. The A* agent selected a random target, while FSM and MCTS chose actions before delegating movement to NavMesh.

Presentation visuals

Reflection

The study clarified the boundary between pathfinding and decision-making. Building A* from scratch exposed the mechanics of graph construction and search, while FSM and MCTS showed how higher-level choices can shape pursuit behavior.