This project involves programming the AI for a 2D top-down game where enemies need to exhibit intelligent behaviors to compete with the player and other AI players. The project is based on a skeleton code and involves various tasks to enhance the AI capabilities.
Functionality:
-
locatePlayer:- Parameters:
String playerId,LinkedListNode<PlayerLocation> playerLocations - Returns:
PlayerLocationof the player with the specifiedplayerId.
- Parameters:
-
closestPlayer:- Parameters:
LinkedListNode<PlayerLocation> playerLocations - Returns:
PlayerLocationof the closest player (excluding itself), using Euclidean distance.
- Parameters:
Testing:
- Implement tests in the
testspackage underLectureTask1.
Functionality:
pathToDirection:- Parameters:
LinkedListNode<PlayerLocation> playerLocations,LinkedListNode<GridLocation> path - Returns:
PhysicsVectorspecifying the direction to move towards the center of the target tile.
- Parameters:
Testing:
- Implement tests in the
testspackage underLectureTask2.
Functionality:
computePath:- Parameters:
GridLocation start,GridLocation end - Returns:
LinkedListNode<GridLocation>representing the shortest path betweenstartandendusing valid moves (up, down, left, right).
- Parameters:
Testing:
- Implement tests in the
testspackage underLectureTask3.
Functionality:
makeDecision:- Parameters:
AIGameState gameState,BinaryTreeNode<DecisionTreeValue> decisionTree - Returns: Action determined by traversing the decision tree.
- Parameters:
Testing:
- No required testing for this task.
Functionality:
distanceAvoidWalls:- Parameters:
AIGameState gameState,GridLocation start,GridLocation end - Returns: Shortest distance between
startandendavoiding walls.
- Parameters:
Testing:
- Implement tests in the
testspackage underLectureTask5.
Functionality:
closestPlayerAvoidWalls:- Parameters:
AIGameState gameState - Returns: Closest player that can be reached while avoiding walls.
- Parameters:
Testing:
- Implement tests in the
testspackage underLectureTask6.
- Level as Graph: Use the
levelAsGraphmethod in theAIGameStateclass for graph-based tasks. - Testing: Ensure comprehensive testing for each implemented functionality to validate AI behavior.