Skip to content

asympto712/Project-Fenrir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Fenrir 𓃧

This project aims to train super-human level AI for Tafl, an ancient Nordic strategy boardgame family. It uses 100% pure Rust, because Rust is cool.

👷 PROGRESS 🏗️

Most of the components were developed & tested, currently in the Training phase

Project overview

The Cargo workspace consists of 3 crates: bitboard, game, and most importantly, Fenrir. The bitboard crate provides the foundation of everything: It defines the bitfield representation of the game board for efficient game implementation. The game crate implements the game logic, and with

cd game
Cargo run

, you can play the game on your terminal (This application was developed using ratatui.rs)!

image from the tui application

Tafl Variants

Tafl is known for its many variations. Fenrir is being trained for two kinds: One is a very simple 7 × 7 Brandub variant, with a bare-minimum set of rules, with the addition of max move count. On the contrast, Hnefatafl is played on 11 × 11 board, with the addition of 3rd repetition rule and shield wall capture. These two were selected so that the first one can serve as the proof of concept.

other notable points

  • use of tch.rs, a Rustic thin wrapper over libtorch, a C++ API of Pytorch.
  • Faithful implementation of AlphaGO, AlphaZero paper.
  • Tafl games are Asymmetrical, with two players playing Attacker and Defender. This creates an unavoidable imbalance to the game. This project tries to test the applicability of Curriculum-based Reinforcement Learning based on self-play.
  • Use of MPI to scale the training over multiple node, espcially aimed at the HPC cluster at here in Berlin

About

game-playing AI for Tafl boardgame, written purely in Rust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages