Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
CMPUT275 project proposal.txt
README.md
aMAZE.py
gamestate.py
generateMaze.py
getch.py
leaderboard.py
maze.png
mazeAI.png
scores.txt
search.py
sprites.py

README.md

aMAZE

Analytics

Overview

aMAZE is a Python-based maze game designed by Leland Jansen and Michael Steer. The objective of the game is to navigate out of a maze while competing against a computer opponent. The game has varying degrees of difficulty such as the maze size and "intelligence" of the computer.

Randomly generated maze and "smart" AI path

AI Performance

An overview and demonstration of the AI's performance can be found at www.lelandjansen.com/project/amaze

Controls

Key Action
Move Up
Move Down
Move Left
Move Right
0-9, Q Menu navigation

Score

One's score is calculated based on the AI difficulty, maze size, progress through the maze, and number of mazes solved. A leaderboard containing this information is available to track progress.

Installation instructions

This game depends on the following resources:

  • Python 3.4
  • PyGame and its dependencies

To install pyGame and all of its dependencies, please run the following command. Copy and paste the string below to install all necessary libraries for this project. This assumes Python3 is already installed.

Linux
cd ~ && sudo apt-get install mercurial && hg clone \
https://bitbucket.org/pygame/pygame && cd pygame && sudo apt-get install \
python3-dev python3-numpy libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev \
libsdl-ttf2.0-dev libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev \
libjpeg-dev libfreetype6-dev && python3 setup.py build && sudo python3 \
setup.py install
Windows
  • Installing Python: Go to the python page and download version 3.5. This installation assumes you are using the 64 bit version
  • Installing pyGame: Download the pyGame installer navigate to the download directory and run the following commands in a command prompt
python -m ensurepip
python -m ensurepip --upgrade
python -m pip install wheel
python -m pip install wheel --upgrade
python -m pip install pygame-1.9.2a0-cp35-none-win_amd64.whl

Contributions

Leland Jansen
  • Maze generation
    • Modified depth-first search to create "perfect" maze
  • AI Algorithm
    • Variable-difficulty using modified depth-first search and A* search
    • Computation of A* bias point
    • Shortest path using breadth-first search
Michael Steer
  • Rendering and exporting the maze
  • Menu system and state machine (Terminal)
  • Pygame implementation and the Game State
  • Path following sprites
  • Scoring system and leaderboards
  • Installation instructions