Skip to content

16Ric/ai_p2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A brief preview of the game can be tested out through this link:
- https://comp30024.pages.gitlab.unimelb.edu.au/2025s1/project/ (demo made by the university)
- https://freckers.pages.dev/  (demo made by an anonymous student)

to run: 
  python -m referee -d -t 180 -s 250 agent:UCB1Agent agent
  python -m referee -d -t 180 -s 250 agent agent:UCB1Agent
  python -m referee -d -t 180 -s 250 agent:GreedyAgent agent
  python -m referee -d -t 180 -s 250 agent agent:GreedyAgent

to test:
  python test.py

usage: referee [-h] [-V] [-w [wait]] [-s [space_limit]] [-t [time_limit]] [-d | -v [{0,1,2,3}]] [-l [LOGFILE]] [-c | -C] [-u | -a | -S] RED BLUE

Conduct a game of Freckers between 2 Agent classes.

Basic usage:
  
  The required positional arguments RED and BLUE are 'package specifications'.
  These specify which Python package/module to import and search for a class
  named 'Agent' (to instantiate for each player in the game). When we assess your
  final program this will just be the top-level package 'agent' as per the
  template given.
  
  You may wish to play games with another agent class from a different package,
  for example, while you develop your agent and want to compare different
  approaches. To do this, use a absolute module name like used with ordinary
  import statements, e.g. 'some_moule.agent2'.
  
  By default, the referee will attempt to import the specified package/module and
  then load a class named 'Agent'. If you want the referee to look for a class
  with some other name you can put the alternative class name after a colon
  symbol ':' (e.g. 'agent:DifferentAgent').

  RED                   location of Red's player Agent class (e.g. package name)
  BLUE                  location of Blue's player Agent class (e.g. package name)

Optional arguments:
  -h, --help            show this message.
  -V, --version         show program's version number and exit
  -w [wait], --wait [wait]
                        how long (float, seconds) to wait between game turns. 0: no delay; negative: wait for user input.
  -s [space_limit], --space [space_limit]
                        limit on memory space (float, MB) for each agent.
  -t [time_limit], --time [time_limit]
                        limit on CPU time (float, seconds) for each agent.
  -d, --debug           show extra debug level logs (equivalent to -v 3)
  -v [{0,1,2,3}], --verbosity [{0,1,2,3}]
                        control the level of output (not including output from agents). 0: no output except result; 1: commentary, but no board
                        display; 2: (default) commentary and board display; 3: (equivalent to -d) extra debug information.
  -l [LOGFILE], --logfile [LOGFILE]
                        if you supply this flag the referee will redirect the log of all game actions to a text file named LOGFILE (default:
                        game.log).
  -c, --colour          force colour display using ANSI control sequences (default behaviour is automatic based on system).
  -C, --colourless      force NO colour display (see -c).
  -u, --unicode         force pretty display using unicode characters (default behaviour is automatic based on system).
  -a, --ascii           force basic display using only ASCII characters (see -u).
  -S, --run-server      run a server for remote game clients to connect to.

About

A repository for AI 2025 Sem 1 Project Part B

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages