#Intelligent Chalice Game
##Overview Demonstrates various algorithm implementations, notably; A* pathfinding, Multilayer perceptron (neural network), and Fuzzy logic.
Each enemy is designed to be autonomous and intelligent, with different coloured enemies exhibiting distinct personalities and behaviour. The personalities are calculated by generating random OCEAN (or 'Big Five') personality percentages. These are then used to determine agent membership in three personality types; Aggressive, Friendly, and Ambitious.
Membership to each personality type is used by the neural network to determine the actions of the agent.
The neural network uses the following inputs (normalised to the range (0 - 1):
- Aggressiveness
- Friendliness
- Ambitiousness
- Hitpoints
- Distance to nearest enemy (Manhattan)
- Hitpoints of nearest enemy
- Distance to nearest ally (Manhattan)
- Hitpoints of nearest ally
- Distance to nearest goal (Manhattan)
- Points value of nearest goal
Generating the following outputs:
- Chance of pursuing and attacking nearest enemy
- Chance of pursuing and healing nearest ally
- Chance of pursuing nearest goal
Enemies will calculate the most optimal path to the determined goal, be it an enemy, a friend, or a chalice. Modifying the number of obstacles on the board can demonstrate this behaviour by forcing the enemies to break blocks, thereby choosing the path of least resistance (weakest blocks), this isn't always obvious to a human player and can be surprising.
Some intelligent agent behaviour can be seen in the example videos.
##Gameplay
The aim of the game is to achieve the goal number of points (42) before anyone else, or be the last agent standing. The dark blue agent is always player 1, whilst the dark red agent is always player 2. Agents of the same colour are on the same team and will exhibit the same personalities traits.
Enemy agents can be attacked, draining their hitpoints. Friendly agents can be healed, increasing their hitpoints up to a maximum. All blocks can be destroyed, having varying hitpoint levels which can be approximated from the visual state of the block.
Modifying the number of enemies can provide interesting behavioural results. ##Install & Run
Install the pygame 1.9.1 library.
Once installed, simply run main.py
The ESC
key can be used at any time during a game to exit.
##Controls
Movement | Key |
---|---|
Player 1 | |
Up | W |
Left | A |
Down | S |
Right | D |
Attack/heal | SPACE |
Player 2 | |
Up | UP |
Left | LEFT |
Down | DOWN |
Right | RIGHT |
Attack/heal | RIGHT CTRL |