Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reversi (Othello) Engine

Rust Engine Board Search Web UI Tests License: MIT

Reversi web UI

a reversi engine written in rust.

the board is represented with two u64 bitboards, one for black and one for white. move generation uses directional bit shifts with edge masks to avoid wraparound across files.

the search is negamax with alpha beta pruning. best_move uses iterative deepening and keeps the best move from the previous depth around for move ordering. there is also a basic transposition table keyed by the black and white bitboards.

the evaluation function changes by game phase:

  • early game: mobility and avoiding bad corner-adjacent squares
  • middle game: mobility, corners, and stable edge/corner discs
  • late game: corners, stability, and disc count

running it

terminal:

cargo run

browser:

cargo run --bin web

then open:

http://127.0.0.1:8080

tests:

cargo test

notes

the default ai depth is 7.

the web version uses the same rust engine through a small local http server. it also has side selection, depth selection, and move history viewing.

license

mit.

About

A fast Rust-powered Reversi engine using bitboards, alpha-beta search, iterative deepening, and heuristic evaluation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages