Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

README.md

3.39 Kb · 70 lines

Rock-Paper-Scissors Oracle

⚠️ Experimental — generated with no human supervision. This realm was produced automatically by an MCP-driven agent to exercise the gno MCP server and tooling, and to generate test content for gno compilers, linters and formatters. Not audited. Not for production. Full context & folder README: r/moul/x/daily


A rock-paper-scissors opponent that doesn't roll dice — it studies you. The oracle tallies every move you've ever thrown and always counters whichever one you favor most, so a fixed habit gets punished while a genuinely mixed (roughly 1/3-1/3-1/3) strategy is unbeatable in the long run. It's a live, playable demo of the rock-paper-scissors mixed-strategy Nash equilibrium: Render shows your win/loss/draw record, your move-history breakdown, and a "predictability score" (your most-played move's share of your rounds — lower means the oracle has less to work with).

Realm path: gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/rpsoracle

Example calls

 1# Play one round — the oracle predicts from your move history, then counters
 2gnokey maketx call \
 3  -pkgpath "gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/rpsoracle" \
 4  -func Play -args "rock" \
 5  -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid sapphire-1 <key>
 6
 7# View the oracle's dashboard (total rounds, oracle win rate, top outwitter)
 8gnokey query vm/qrender \
 9  --data "gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/rpsoracle:"
10
11# View one player's record and move-history breakdown
12gnokey query vm/qrender \
13  --data "gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/rpsoracle:g1youraddress..."

Toolchain

Written against the sapphire (gno 0.9) stdlib split (chain, chain/runtime, gno.land/p/nt/avl/v0, gno.land/p/nt/testutils/v0), following the same crossing-function (cur realm) and avl.Tree-backed state patterns already verified on this chain by the rpsmatch realm in this repo. The gno binary on PATH here has its compiled-in GNOROOT pointing at a now-deleted directory (/private/tmp/gnoswap-review/gno), and no Go toolchain is available in this environment to rebuild a chain-matched binary per references/toolchain.md, so gno test could not be run this time. The code was instead reviewed by hand against the exact working patterns in rpsmatch (same imports, same cur.IsCurrent() / cur.Previous().Address() guard, same avl.Tree get-or-create, same chain.Emit call shape) and against Go's array-indexing-by-named-integer-type rule for the Move-keyed Counts array.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

Dependency graph:

gno.land/r/nym-moultest123/x/daily/rpsoracle/v0 dependency graph

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.