PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/moul/x/daily/rpsoracle/v0

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v0
Namespace
moul / x / daily / rpsoracle
Files
3 (README)(gnomod.toml)
Exported functions
2
Module
gno.land/r/moul/x/daily/rpsoracle/v0
gno
0.9

Files (3)

  • README.mdmarkdown
  • gnomod.tomltoml
  • rpsoracle.gnogno
README.mdPreviewRaw
# 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](https://github.com/moul/gno-contracts/blob/main/r/moul/x/daily/README.md)

---


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

```sh
# Play one round — the oracle predicts from your move history, then counters
gnokey maketx call \
  -pkgpath "gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/rpsoracle" \
  -func Play -args "rock" \
  -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid sapphire-1 <key>

# View the oracle's dashboard (total rounds, oracle win rate, top outwitter)
gnokey query vm/qrender \
  --data "gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/rpsoracle:"

# View one player's record and move-history breakdown
gnokey query vm/qrender \
  --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.

<!-- BEGIN GNOCONTRACTS FOOTER (generated by `make readmes`; do not edit below) -->

---

Part of **[moul/gno-contracts](https://github.com/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/moul/x/daily/rpsoracle/v0 dependency graph](https://raw.githubusercontent.com/moul/gno-contracts/main/_assets/gno.land/r/moul/x/daily/rpsoracle/v0/deps.png)

> 🧪 **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](https://github.com/moul/gno-contracts/blob/main/DISCLAIMER.md).

<!-- END GNOCONTRACTS FOOTER -->

Functions

  • Play(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, moveStr string) string

  • Render(path string) string

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

Rendered

RenderedRawgnoweb ↗

vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.