项目作者: pointsgame

项目描述 :
OPen Points Artificial Intelligence
高级语言: Rust
项目地址: git://github.com/pointsgame/oppai-rs.git
创建时间: 2015-08-08T08:11:16Z
项目社区:https://github.com/pointsgame/oppai-rs

开源协议:GNU Affero General Public License v3.0

下载


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:

  1. cargo build --release

Run with:

  1. cargo run --release

or with:

  1. ./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:

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

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

Testing

You can run test with:

  1. cargo test

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

  1. RUST_LOG=debug cargo test

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

  1. 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