getzen/mini_shogi

Mini Shogi a simplified introduction to the Japanese game Shogi

I created this app as a way to learn a little Shogi, but primarily Rust and Macroquad, the graphics framework

Mini Shogi

.

.

There are two AI opponents:

  • (Enabled) Minimax. The classic "look x moves ahead" algorithm used in many perfect information situations. It has alpha-beta pruning, but it otherwise unsophisticated. On my computer, it can search about 1 million board positions per second, but it's still rather weak since the evaluation function is currently terrible. Be aware that looking ahead more than about 7 moves is rather slow.

  • (Disabled) Monte Carlo. This algorithm makes each available move and then randomly plays out the game to completion a certain number of times (rounds). Due to its random nature, it plays with more variability than Minimax. This is "pure" Monte Carlo, a simple version that doesn't have the advantages of a full Monte Carlo Tree Search, which I hope to add later. It searches about 120,000 positions per second on my computer.

To-Do:

  • Improve minimax evaluation function.

  • Add more sounds: welcome, win/loss.

  • Add sound volume setting.

  • Prevent AI from evaluating identical reserve pieces.

  • Add rule about no checkmate by parachuting pawn? Doesn't seem particularly crucial though.

Maybe

  • Check out Macroquad's Texture2D.get_texture_data -> Image.get_pixel() for hit detection. Docs have warning: "This operation can be expensive."

  • Add "radio" functionality to ButtonBar. Remove handling from ViewSettings.

  • Add forward/back move functionality.

  • Revisit MonteCarloTree implementation.

  • Consider a Minimax / MonteCarlo hybrid where the evaluation function of Minimax uses a random playout if depth is beyond a certain level and state is Ongoing. That would avoid the need for a proper board evaluation function.

Information - Updated Sep 07, 2022

Stars: 1
Forks: 0
Issues: 0

Repositories & Extras

Ternary search tree collection in rust with similar API to std::collections as it possible

Ternary search tree is a type of trie (sometimes called a prefix tree) where nodes are arranged in a manner similar to a binary search...

Ternary search tree collection in rust with similar API to std::collections as it possible

Search a sequence of bytes in a binary file

Searching for a byte sequence in a file

Search a sequence of bytes in a binary file

SerpApi Search in Rust

This Rust package enables to scrape and parse search results from Google, Bing, Baidu, Yandex, Yahoo, Ebay, Apple, Youtube, Naver, Home depot and more

SerpApi Search in Rust

A search engine project, that will index only sites without ads and trackers

Saying it otherwise - search results should be all uBlock Origin clean

A search engine project, that will index only sites without ads and trackers

Search more with less

Quickwit is a cloud-native search engine for log management & analytics

Search more with less

Binary Search Tree

A binary search tree that supports insert, search, and traversal made in rust

Binary Search Tree

Vector Search Engine for the next generation of AI applications

Similar Image Search - Food Discovery 🍕

Vector Search Engine for the next generation of AI applications

search_and_replace

Search and Replace CLI application from text-colorizer

search_and_replace

Rapidly Search and Hunt through Windows Event Logs

Chainsaw provides a powerful ‘first-response’ capability to quickly identify threats within Windows event logs

Rapidly Search and Hunt through Windows Event Logs
Facebook Instagram Twitter GitHub Dribbble
Privacy