Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tboydston/supremetictactoe
Löve 2d, Lua tictactoe implementation of Minimax algo with alpha/beta pruning. Includes sardonic AI opponent, multiple win paths and over 200 ego shattering quips.
https://github.com/tboydston/supremetictactoe
love2d lua minimax tictactoe
Last synced: about 1 month ago
JSON representation
Löve 2d, Lua tictactoe implementation of Minimax algo with alpha/beta pruning. Includes sardonic AI opponent, multiple win paths and over 200 ego shattering quips.
- Host: GitHub
- URL: https://github.com/tboydston/supremetictactoe
- Owner: tboydston
- License: gpl-3.0
- Created: 2020-07-17T10:05:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-29T13:42:03.000Z (about 4 years ago)
- Last Synced: 2024-09-17T03:46:04.079Z (4 months ago)
- Topics: love2d, lua, minimax, tictactoe
- Language: Lua
- Homepage:
- Size: 1.75 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Supreme TicTacToe
![banner](assets/header.jpg)
## Overview
You, a mere mortal meatbag, face off against the perfect immortal machine known as "Supreme" in an epic battle of X's and O's. It will require all or your human cunning to find and exploit bugs to defeat Supreme at it's own game.
Highlights
- 8 unique paths to victory.
- Over 200 ego shattering insults.
- Disappointing 8 bit graphics.## Less Hyperbolic Overview
Supreme TicTacToe was created when I was playing around with implementing miniMax alpha beta pruning in Lua for Love2d. I got tired of playing against myself and so added a little frenemy to play against.
Overall it is a puzzle game. You cannot defeat Supreme at tictactoe but if you’re clever you unleash your inner QA engineer and exploit bugs in Supreme's code.
# Code Overview
As with all Love2d programs the entry point is 'main.lua'. All traditional love game loop calls are routed to the 'SceneManager' which is a singleton responsible for directing calls to the active scene.
### Minimax Alpha/Beta Pruning Implementation
If you are here for the lua minimax implementation see lib/miniMaxMove.lua
### File Structure
assets - Contains graphics, sounds, fonts, ect.
entities - If it draws on the screen it is an entity. Entities are created using entity1 = Entity:new()
lib - Libraries contain global functions that are expected to exist only once. There internal function are called using lib.function()
quips - Quips control Supreme's speech. There are autoload by the quipManager library and new quips can be added directly
scenes - Scenes are the game-loop for each scene. They are auto-loaded by the sceneManager.
config.lua - Basic config data mostly used for debugging.
main.lua - Program start point.# Running The Game.
Supreme TicTacToe can be run directly from the console using the below command on mac/linux systems.
``
love . --console
``# Building the game
We build Supreme TicTacToe using 'Make Love' available here.
https://github.com/pfirsich/makelove
# Thanks
Thanks to Komodeo for playtesting and improving content.