Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 

Repository files navigation

In optimisation problems, it is rarely realistic to assume that everything is deterministic.
This repository presents a simple example of how uncertainty can be handled in optimisation: a darts game.

Darts Strategy Optimiser

Playing darts with your friends and want to maximise your chances of winning? This repo is for you (see Disclaimer).

Game rules

"Double out" rules are applied: one must finish hitting a double or double bullseye.

E.g. with 16 points left, hitting 16 doesn't win, you must hit double 8 instead (exterior ring).

Finding your skill

Depending on how often you can hit the bullseye (together with double bullseye), you can choose a skill level:

  • Top-10 professional~70% of the time → skill in the game: 10
  • Professional player~42% of the time → skill in the game: 15
  • Amateur league player~25% of the time → skill in the game: 20
  • Amateur / casual player~10% of the time → skill in the game: 35

How to run

Given your score, number of turns you want to finish in, and your skill, the program computes the best aiming position.

Run main.py

Heatmap

Indicating, for example, 17 points left, 1 turn and skill 35, a heatmap showing the probability of winning when aiming at each point on the dartboard is displayed,

Heatmap of probabilities

Interactive application

After closing the heatmap, an interactive application will pop up to guide you through your throws. Interactive dartboard

Setup and Run

From the project root, create a virtual environment, install the dependencies, and run __main__.py.

macOS / Linux

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m darts_strategy

Windows (Command promt)

python -m venv .venv
.venv\Scripts\activate.bat
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m darts_strategy

Disclaimer

This repository is used only to illustrate the technology used to optimise under uncertanty. If you want a program for a more realistic scenario (i.e. having an oponent), please contact the owner of the repository.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages