Discord
@ciaran/hare-and-tortoise
Simulation
0
Public

Hare and Tortoise

A simulation of the popular board game Hare and Tortoise.

Based on the popular board game Hare and Tortoise.

The board game is intended for 2-6 players. The aim of the game is to go around the track as fast as possible. There are no dice. Instead, players spend carrots to move. Each player starts with 68 carrots. A move costs the triangular number of the number of fields they wish to move (1,3,6,10,15,21,etc.). There are a number of ways to earn carrots along the way. Each player also begins with lettuce cards, which must be eaten on lettuce fields before completing the race.

Full set of rules can be read at the author's website: https://www.parlettgames.uk/haretort/htrules.html

Hare squares are now implemented with the tournament rule. (When you land on a hare square do nothing immediately. If nobody goes past you, draw 10 carrots when you next move. If they do, pay 10 carrots into the carrot patch for each player who goes past you, in either direction.)

The fields are coloured as follows: White: Hare/Rabbit Orange: Carrot Bronze/Brown: Number 3 Bright Green: Lettuce Dark Green: Tortoise Blue: Number 4 Silver/Grey: Number 2 Gold: Number 1 Black: Start & Finish

About the Simulation

Each field of the board and each player is represented by an agent.

The player agents follow different decision-making strategies. I'm trying various different approaches. The baseline, is for players to move randomly amongst the allowed moves (except that they will always finish in one move if they can do so).

It's almost entirely written in javascript, except for the decision-making behaviour which is in python (in anticipation of some machine learning algorithms).

As of version 1.1.0, there are some additional support behaviours for calculating the value of a move and calculating possible finishing moves over multiple turns. As of this version (1.1.0), these are fairly rudimentary. Currently the finish calculation ignores field types, which makes it near useless for actually strategising on possible moves.