Skip to content

Rust implementation of a minimax algorithm. The game is a custom version of the Oware. Using Alphabeta pruning, move ordering, and a tiny iterative deepening.

Notifications You must be signed in to change notification settings

Coruscant11/Rust-Oware-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rust-Oware-AI

A Rust implementation of an Oware AI. Using minimax algorithm, alphabeta pruning and move sorting.

The purpose of this project is to compare the performances to a similar project written with C++. I used crossbeam::scope for the multithreading aspect, and there is some unit tests for the board. This Rust version is apparently the faster one.

How to run :

cargo run --release

Performances

First move speed with four threads in this Rust version :

cargo run --release

Capture d’écran 2022-01-07 à 14 58 04

The same move but in the C++ version (g++ -std=c++20 -Ofast *.cpp;./a.out):

g++ -std=c++20 -Ofast *.cpp

Capture d’écran 2022-01-07 à 14 58 06

Conclusion

I did my best to write exactly the same algorithm between the two versions. Both of them are available on my github, do not hesitate to tell me if i made a mistake somewhere, making the implementation not fair. I'm a litte bit surprised to see the Rust version win over C++. That's great !

About

Rust implementation of a minimax algorithm. The game is a custom version of the Oware. Using Alphabeta pruning, move ordering, and a tiny iterative deepening.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages