briscolabot

Reinforcement Learning agent that plays Briscola, a famous Italian card game

https://github.com/letteraunica/briscolabot

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.5%) to scientific vocabulary

Keywords

actor-critic ai briscola deep-learning deep-reinforcement-learning game game-theory machine-learning ml multi-agent-reinforcement-learning ppo proximal-policy-optimization python pytorch reinforcement-learning
Last synced: 6 months ago · JSON representation ·

Repository

Reinforcement Learning agent that plays Briscola, a famous Italian card game

Basic Info
  • Host: GitHub
  • Owner: LetteraUnica
  • License: mit
  • Language: TeX
  • Default Branch: main
  • Homepage:
  • Size: 17 MB
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 2
  • Open Issues: 1
  • Releases: 0
Topics
actor-critic ai briscola deep-learning deep-reinforcement-learning game game-theory machine-learning ml multi-agent-reinforcement-learning ppo proximal-policy-optimization python pytorch reinforcement-learning
Created about 3 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Citation

README.md

BriscolaBot

Repository of the master thesis BriscolaBot: Mastering Briscola with model-free Deep Reinforcement Learning.

We studied and implemented an AI Agent that plays Briscola, a famous italian card game.

Playing against the AI 🇬🇧

You can play against our latest agent BriscolaBot-v3 both locally and on replit

On replit

  1. Click the following link https://replit.com/@LorenzoCavuoti/BriscolaBot
  2. Press Play
  3. Enter fullscreen mode Alt text

Locally

Copy paste the following in a bash terminal

bash git clone https://github.com/LetteraUnica/BriscolaBot.git; cd BriscolaBot; python3 -m pip install .; python3 main.py

Giocare contro l'AI 🇮🇹

Puoi giocare contro il nostro ultimo agente BriscolaBot-v3 sia in locale che su replit.

Su replit

  1. Clicca il seguente link https://replit.com/@LorenzoCavuoti/BriscolaBot
  2. Premy Play
  3. Entra in modalità a schermo intero Alt text

In locale

Copia e incolla il seguente codice in un terminale bash.

bash git clone https://github.com/LetteraUnica/BriscolaBot.git; cd BriscolaBot; python3 -m pip install .; python3 main.py

Contributing

If you wish to contribute or have ideas on how to extend this project feel free to open an issue, reach out on Discord (username "lettera") or by email at lorenzocav97@gmail.com

Results 📊

The agent wins against average human players 59% of the time. More impressive are the results against expert players, where BriscolaBot-v3 has won 52% of the games, with only one expert player Silvio, being able to beat it with a score of 12-11.

The black dashed line represents the 50% win rate, while the gray vertical lines represent the 90% confidence interval.

All the human players we tested against expressed that the agent is very good at the game. One of the best performing players, Simone, found the agent frustrating to play against because it seemed to predict his hand cards.

Training procedure 🏋️‍♀️

The agent plays a total of 2048 games against 4 opponents sampled from the Agent Pool. The agent collects this experience and stores it in an Experience Buffer, which is then used to train the agent. After training with the PPO algorithm, a copy of the updated agent is inserted into the Agent Pool with frozen weights, and the process is repeated until the agent reaches the desired performance. For more information read the thesis or explore the notebook.

Citing BriscolaBot

latex @misc{lorenzo2023briscolabot, author = {Lorenzo, Cavuoti}, title = {BriscolaBot: Mastering Briscola with model-free Deep Reinforcement Learning}, year = {2023}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/LetteraUnica/BriscolaBot}} }

Owner

  • Name: Lorenzo Cavuoti
  • Login: LetteraUnica
  • Kind: user
  • Location: Rimini, Italy
  • Company: University of Trieste

Data Science student, ML and AI curriculum. BSc in Physics.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Cavuoti
    given-names: Lorenzo
title: "BriscolaBot: Mastering Briscola with model-free Deep Reinforcement Learning"
version: 1.0.0
date-released: 2023-02-18

GitHub Events

Total
Last Year

Dependencies

pyproject.toml pypi
  • gymnasium *
  • numpy *
  • onnxruntime *
  • pettingzoo *
  • pygame *
  • pytest *
  • requests *
  • scipy *
  • torch *
  • wandb *