Skip to content

ojbucao/wb-lean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Withering Blights (Lean Simulation)

A Ruby simulation of the Withering Blights social-pressure game, built on top of PlayLab/Plummer.

Prerequisites

This project uses local path dependencies. The following repos must exist at these paths relative to this repo:

  • ../../Projects/playlab-lean
  • ../../Projects/plummer-lean
  • ../../Projects/ruby-champ

From simulation/withering_blights.rb, PlayLab is loaded from:

  • ../../../Projects/playlab-lean/lib/playlab

Setup

bundle install

Run A Single Game

bin/play

Or directly with bin/simulate:

bin/simulate -n 1 -v -p balanced,opportunist,threshold_7,reckless

Tournament Runs

bin/simulate -n 1000 --parallel --threads 8 -p balanced,balanced,balanced,balanced

Useful flags:

  • -n, --iterations N
  • -s, --seed SEED
  • -p, --strategies S1,S2,S3,S4
  • --parallel
  • --threads N
  • --shuffle (shuffle seating order each game)
  • -f, --format ultra|compact|json
  • -o, --output FILE
  • --ultra-log PATH (JSONL payloads, one line per game)

Strategy Names

Built-in named strategies:

  • cautious
  • reckless
  • balanced
  • opportunist
  • survivor
  • gambler
  • diplomat
  • positional
  • reactive

Parameterized strategy:

  • threshold_N (example: threshold_7)

Monte Carlo aliases are also supported (see MONTE_CARLO_DISTRIBUTIONS in bin/simulate).

Development Tasks

List available tasks:

bundle exec rake -T

Common workflow commands:

bundle exec rake            # default task; same as `rake test`
bundle exec rake spec       # run RSpec suite
bundle exec rake test       # alias for spec
bundle exec rake lint       # run RuboCop (cache disabled for restricted envs)
bundle exec rake check      # run tests, then lint
bundle exec rake lint:todo  # regenerate `.rubocop_todo.yml` baseline

Autocorrect tasks are also available via RuboCop:

bundle exec rake lint:autocorrect
bundle exec rake lint:autocorrect_all

Repo Layout

  • bin/ command entrypoints
  • cards/ YAML card data
  • simulation/ game config, stages, strategies, effects, formatting
  • spec/ RSpec tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published