Skip to content

About

Expectimax dynamic depth search tree AI to win the popular game 2048.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

2048_python

This is a repository for the final code of a project I completed alongside a partner of mine.

Four files:

  • game_ai.py
  • game_display.py
  • game_functions.py
  • test_single_game.py

game_ai.py

--> This codes the artificial intelligence aspect of the game, in combination with the game_functions.py file, it allows the AI to run the game through to the end.

game_functions.py

--> Contains necessary functions to run the game properly, whether with the use of AI or playing manually as a human player.

game_display.py

--> This codes the local display that appears when the code is run, allowing you to play as a human player with the "W" "A" "S" "D" keys on your keyboard, correlating of course with the movements "up" "left" "down" "right". You may also hit the "1" key on the keyboard to active the AI to take over.

test_single_game.py

--> This file will run the game without a GUI display, it will instead run the code and display the game through the terminal output as plain text until completion. It automatically uses the AI, there is no option for human/manual play.

About

Expectimax dynamic depth search tree AI to win the popular game 2048.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages