Skip to content

About

Mathematical agent simulations: theory-of-mind box simulation and fraud-detection trust simulator. Bayesian beliefs, reputation, deception, deterministic seeded replay.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

26 Commits

Folders and files

Repository files navigation

Math Simulation

Two interactive mathematical agent simulations. Open the HTML files in any browser — no build step, no dependencies.

Fraud Box — Trust & Deception Simulator (fraud-box.html)

A marketplace where accounts transact and amounts scale with reputation-driven limits. Hidden types: honest accounts, opportunists who defect when the amount beats their reputation, and bust-out fraudsters who farm trust, cash out big, and re-enter fresh.

You run the detector, three switchable modes:

  • Mode 0 — rules: freeze after 3 complaints
  • Mode 1 — Bayes: P(honest) per account, exact update formula printed on the page
  • Mode 2 — Bayes + probes: a probe agent steers witness transactions at accounts whose limit climbs while unverified (counterexample separation)

Live scoreboard: fraud loss, caught before cash-out, false positives, detection rate. Collusion-ring contraction-depth slider, click-account inspector with hidden types and belief error, deterministic seed replay (same seed = identical run).

Seed 42, 4,000 ticks: Mode 0 loses $1,681 (36% caught), Mode 1 loses $834 (57%, 0 false positives), Mode 2 loses $1,039 (56%) — probes buy evidence, and evidence is not free.

The Box Simulation (box-simulation.html)

Agents forage and meet in prisoner's-dilemma encounters. Theory-of-mind depth switch: Level 0 reactive, Level 1 models others, Level 2 recursive (models others modeling it). Bayesian beliefs about every other agent, reputation tracking, deceptive signaling, tensor-contraction joint belief inference, deterministic seeded mode with conditional-expectations placement, witness-seeking to falsify confident beliefs, and a contraction-depth slider trading belief accuracy against compute cost.

Run it

Live: https://instafire.github.io/math-simulation/ — or open any HTML file locally. No build step, no dependencies, works offline. Keyboard: Space pause, . step, R reset. Deterministic mode + seed replays a run exactly, so every number above is reproducible.

How the pieces connect

The Box came first: what mathematical structure makes an agent aware of others? Answer in three levels — reacts, models others, models others modeling it — with Bayesian beliefs as the measurable core. A deterministic discrete-logarithm paper then supplied four transferable techniques (tensor-contraction joint inference, conditional-expectations derandomization, counterexample separation, terminal-preserving compression), each mapped to a Box mechanism. Fraud Box re-skins the same engine as a real application: trust beliefs, reputation limits, bust-out fraud, and probe transactions as witness tests.

Notes

Toy models with ground truth visible — built to make the dynamics inspectable, not as production fraud systems. Real systems use learned features and partial observability.

Research

Study notes from close readings of math/physics papers live in research/ — the deterministic-DLP paper whose methods power the Box Simulation's belief engine, and a fourteen-document corpus studied and not adopted, with a reflection on five failure forms and eight detectors for definitional tautology dressed as discovery.

About

Mathematical agent simulations: theory-of-mind box simulation and fraud-detection trust simulator. Bayesian beliefs, reputation, deception, deterministic seeded replay.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages