File size: 1,783 Bytes
7df530a
 
 
 
 
 
 
 
66073f0
7df530a
 
 
 
ea88929
 
 
66073f0
ea88929
 
 
 
66073f0
ea88929
 
 
 
 
7df530a
ea88929
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---

title: Baghchal
emoji: πŸ…
colorFrom: yellow
colorTo: green
sdk: static
pinned: false
license: mit
short_description: Play Baghchal in-browser vs a tablebase-checked engine
---


# Baghchal β€” Tigers & Goats

Play the Nepali board game against a real engine. Everything runs **in your browser**: legal-move
generation, the OBX board notation, and the engine ladder from `pebble` (random) up to `phantom`
(PVS + LMR search).

**How strong is `phantom`?** Baghchal is a solved game β€” it is a draw with best play β€” so every
move can be checked against the truth. Over 400 sampled positions `phantom` plays a value-optimal
move **90.3%** of the time *on positions where the choice actually matters*: the ones where at
most half the legal moves hold the game value. A uniformly random player scores **20.6%** there.

That qualifier is the whole point. The unrestricted "agreement with perfect play" figure is
**96.0%** for `phantom` β€” but **64.1%** for a bot playing at random, because in a drawn game
almost any move preserves the draw. Quoting the unrestricted number alone makes a listless engine
look nearly perfect, so both are published here. (Reproduce with `python -m bagh_bench.agreement

--states 400 --time-ms 300 --bots pebble,shepherd,hunter,stalker,phantom,venom`.)



There is no server. This is a *static* Space; the Python engine is CPython compiled to WebAssembly

via [Pyodide](https://pyodide.org), loaded on your first bot move. If Pyodide cannot start, the

board falls back to a lighter JavaScript engine so the game always works.



Set a **Bot API** URL in the side panel to use a hosted engine instead β€” that is the only way to

reach the *perfect* tablebase bot, which needs an 8.7 GB solved database no browser can hold.