Skip to content

BenFielding/intelligent-chalice-game

Repository files navigation

#Intelligent Chalice Game

example screenshot of gameplay

##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):

  1. Aggressiveness
  2. Friendliness
  3. Ambitiousness
  4. Hitpoints
  5. Distance to nearest enemy (Manhattan)
  6. Hitpoints of nearest enemy
  7. Distance to nearest ally (Manhattan)
  8. Hitpoints of nearest ally
  9. Distance to nearest goal (Manhattan)
  10. Points value of nearest goal

Generating the following outputs:

  1. Chance of pursuing and attacking nearest enemy
  2. Chance of pursuing and healing nearest ally
  3. 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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages