OPen Points Artificial Intelligence
  • Rust 98.4%
  • Shell 1.1%
  • PLpgSQL 0.2%
  • Nix 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-18 00:26:33 +02:00
.cargo Add cargo cfg. 2026-07-18 23:23:36 +02:00
ai Fix webgpu. 2026-07-08 10:41:58 +02:00
ais Pass model by immutable reference. 2026-08-06 19:31:52 +02:00
bench Update rand. 2026-03-09 18:52:05 +01:00
cli Change iterations limit types for zero. 2026-07-12 12:40:49 +02:00
client Format code with new rustfmt. 2025-06-25 22:18:30 +02:00
common Filter trajectory moves near the last position without divisions. 2026-07-12 15:24:17 +02:00
field Simplify. 2026-07-12 15:19:13 +02:00
iced Weight playouts by the predicted value uncertainty. 2026-08-03 23:47:19 +02:00
initial More compact field representation. 2025-06-29 21:28:34 +02:00
ladders Don't reevaluate single-point ladder trajectories. 2026-07-12 20:54:58 +02:00
minimax Drop u32 hash table. 2026-03-07 19:09:29 +01:00
patterns Optimize coordinates calculation. 2025-06-29 14:43:47 +02:00
protocol Format code with new rustfmt. 2025-06-25 22:18:30 +02:00
resources Update logo. 2023-10-15 20:35:01 +03:00
rotate Switch to rust 2024. 2025-02-28 11:41:55 +01:00
server Update dependencies. 2026-07-30 12:48:27 +02:00
sgf Fix sgf coordinates. 2026-07-15 09:46:18 +02:00
svg Fix tests. 2025-10-09 09:41:24 +02:00
term-render Update resvg. 2026-03-09 21:45:33 +01:00
test-images Switch to rust 2024. 2025-02-28 11:41:55 +01:00
uct Store uct node stats as u32. 2026-07-12 12:26:26 +02:00
verify Update rand. 2026-03-09 18:52:05 +01:00
verify-child Update rand. 2026-03-09 18:52:05 +01:00
versus Move width and height to cli args. 2026-06-19 20:24:11 +02:00
webworker Change iterations limit types for zero. 2026-07-12 12:40:49 +02:00
zero Fair openings. 2026-08-09 12:07:00 +02:00
zero-burn Global gradient clipping. 2026-08-09 10:55:50 +02:00
zero-sgf Reduce search of winning games. 2026-08-05 19:51:56 +02:00
zero-train Use non-swa model for self-play. 2026-08-18 00:26:33 +02:00
.editorconfig Add .editorconfig 2019-05-17 23:28:42 +03:00
.envrc Add flake. 2022-05-13 23:23:03 +03:00
.gitignore Initial wasm support. 2023-05-22 10:36:00 +03:00
Cargo.lock Parallel games. 2026-08-04 13:58:17 +02:00
Cargo.toml Update dependencies. 2026-07-30 12:48:27 +02:00
flake.lock Update dependencies. 2026-07-30 12:48:27 +02:00
flake.nix Add rocm feature. 2026-06-11 22:15:48 +02:00
LICENSE.txt Change license to AGPLv3. 2015-10-06 09:13:30 +03:00
README.md Remove Best Node Search algorithm from ideas. 2024-06-10 18:58:12 +02:00
rustfmt.toml Remove unstable settings from rustfmt. 2022-09-25 11:48:32 +03:00

Oppai-rs

Logo

Oppai-rs (acronym for "OPen Points Artificial Intelligence") is an artificial intelligence for the game of points.

You can play with it using iced module.

Features

  • Two algorithms for searching the optimal move: UCT, Minimax.
  • Two implementations of Minimax search: PVS (a.k.a. NegaScout), MTD(f).
  • UCT tree reuse between moves.
  • Trajectories for moves pruning in the Minimax search tree.
  • Lock-free multi-threading for both Minimax and UCT.
  • Transposition table using Zobrist hashing for Minimax.
  • DFA-based patterns searching.
  • DSU to optimize capturing (behind a feature flag since it's good only for UCT).
  • Time-based and complexity-based calculations.
  • Generic ladders solver.

Running

Once you have rust installed on your system, compile with:

cargo build --release

Run with:

cargo run --release

or with:

./target/release/oppai-rs

If you are running the produced binary on the same CPU it was built on you might want to specify target-cpu flag:

RUSTFLAGS="-C target-cpu=native" \
  cargo build --release

Depending on your hardware it might increase the performance by up to 10%.

Testing

You can run test with:

cargo test

If you want to see log output during tests running you can use RUST_LOG environment variable:

RUST_LOG=debug cargo test

Also if you have nightly rust you can run benchmarks with:

cargo bench --features bench

Ideas

  • Fill debuts database.
  • Fill heuristics database.
  • Use patterns for UCT random games (see link).
  • Use patterns for Minimax best move prediction.
  • Complex estimating function for Minimax (see link)
  • Smart time control for UCT (see link).
  • Smart time control for Minimax.
  • Think on enemy's move.
  • Forbid typical losing ladders.
  • Split trajectories by groups for Minimax and solve them independently.

License

This project is licensed under AGPL version 3 or (at your option) any later version. See LICENSE.txt for details.

Copyright (C) 2015-2024 Kurnevsky Evgeny, Vasya Novikov