Skip to content

nicholastanvis/mancala

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mancala AI

Example Usage

# main.py

from Simulator import Simulator
from agents import *

# Define the two agents that will play the game.
p1 = HumanAgent()
p2 = MinimaxAgent(9)
simulator = Simulator(p1, p2)
simulator.start()
$ python main.py

Simulator

  • Simulator(p1, p2): starts a simulator for the two agents, p1 and p2
  • Simulator(p1, p2, silent = True): same as above but output is suppressed

Available Agents

RandomAgent()

An agent that chooses a random action.

HumanAgent()

An agent that prompts the user for every action.

GreedyAgent()

An agent that greedily chooses the best action every turn.

MinimaxAgent(depth)

An agent that uses the minimax algorithm to search through the game tree over a certain depth.

About

Mancala AI written in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages