Player-Like Mech AI

This project was a university assignment I completed wherein I had to design and implement a decision tree for a game AI to emulate a player in a mech battling game.

For this project, I implemented behaviour functions in the main AI script and ran all decision logic from the behaviour tree.

Part of being a player-like AI meant that I could only use information that a player could reasonably have had access to, like line of sight to enemies, guessing where enemies were going when leaving line of sight, and only attempting to gather pickups that they had seen before.

The AI used it’s current ammunition, health, and number of known opponents to determine how aggressive to be. When running low on ammunition and health, the need for pickups greatly increases. Players also tend to try and disengage when being targeted by multiple aggressors, which this AI does also.

You can find my decision tree file and my AI script on my GitHub.