Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.
/ UI-Pacman Public archive

designing intelligent agent to beat Human in UI-Pacman game

License

Notifications You must be signed in to change notification settings

Mehrdadghassabi/UI-Pacman

Repository files navigation

Installing prerequisites (Python, Pip and Packages)

1- Install Python version 3.6 or upper

2- Create and activate virtual environment according to your operating system. Unix and Windows

3- Active or install Tkinter: this or this or this

4- Install packages by the following command

    pip install -r requirement.txt

Runing server

1- Open CMD or terminal

2- Activate virtual environment mentioned before

3- Go to server directory by the following command

    cd server

4- Run server (engine)

    python server_main.py
  • After all players joined the server, the game started.
  • When the game finish, a JSON file is created in the 'game_logs' directory, and you can use it for visualizing.
  • You can change the configuration of the game by changing 'config.json' in the server directory.

Runing visualizer

  • For use visualizer, you should install Tkinter

1- open CMD or terminal

2- Activate the virtual environment mentioned before

3- Go to server visualizer by the following command

    cd visualizer

4- Run visualizer

    python visualizer_main.py

5- Select created JSON file from 'game_logs' directory to visualize the game

Visualizer keys

  • E: Increase game speed

  • W: Decrease game speed

  • S: Stopping the game

  • Q: Quit from game

  • B: Increase display size

  • N: Decrease display size

  • R: Reset game showing

Clients

  • Lots of inteligent Agent have been implemented you can run them and compare them with yourself
  • my smart agent is 'mehrdad_agent.py'
  • You can use 'client_main.py' to develop your AI code. Your code should be placed on the 'do_turn' function.
  • You can change IP and Port of server in 'client_config.json'
  • Forked from this