Watch nine bots play

A live table with no reader seat: nine bots play, every card is up, and the reader watches. The config sits in the page itself, so there is no second file.

Theme

Nine bots at a 50/100 table.

What you need

Step 1: load the element

Put this line in the page once. Every table on the page shares it.

<script type="module" src="https://cdn.jsdelivr.net/npm/@imperialbower/bowery@0.3.0/bowery.js"></script>

To host it yourself, unpack bowery-vX.Y.Z.tar.gz from a release into a folder, for example bowery/, and load bowery/bowery.js instead. The element loads its wasm from the same folder.

Step 2: put the table and its config in the page

This is the whole table. The YAML goes in a <script type="application/yaml"> inside the element.

<bowery-table>
  <script type="application/yaml">
mode: play
layout: ledger
view: all
table: { seats: 9, stakes: { small_blind: 50.0, big_blind: 100.0 } }
players:
  - { seat: 0, stack: 10000, bot: gto }
  - { seat: 1, stack: 10000, bot: tight_passive }
  - { seat: 2, stack: 10000, bot: loose_aggressive }
  - { seat: 3, stack: 10000, bot: tight_aggressive }
  - { seat: 4, stack: 10000, bot: loose_passive }
  - { seat: 5, stack: 10000, bot: maniac }
  - { seat: 6, stack: 10000, bot: abc }
  - { seat: 7, stack: 10000, bot: short_stack_ninja }
  - { seat: 8, stack: 10000, bot: gto }
seed: 9
delay_ms: 400
  </script>
  <p>Nine bots at a 50/100 table.</p>
</bowery-table>

Many tables can sit on one page. Each has its own config and its own game; they share one wasm module.

Step 3: serve the page

python3 -m http.server 8000

Win percents

% shows every live seat's win percent, and with two seats left and one card to come, the trailing seat's outs; it is only there when every card is up. Play mode starts with odds off: the bots run on a timer, and a nine-way preflop step is a second of Monte Carlo in the browser. The reader turns them on with %, which is there because this config says view: all. The preflop percent is sampled, so it may differ from the figure bowery-still --odds prints.

Settings you can change

FieldValuesWhat it does
modeplayA live table. Needed.
table.seats2 to 10Chairs at the table.
table.stakessmall_blind, big_blind, anteWhole chips.
players{ seat, name, stack, bot }Who sits where. Give each a bot to watch only.
viewall, seatEvery card up, or one seat's.
layoutring, spotlight, ledgerHow the table is drawn.
controls.oddstrue, falseShow the % button. Default: shown when the view is all.
seeda numberThe same hands on every load.
delay_msa numberMilliseconds between bot moves. Default 700.

Every field: Config on docs.rs. The bots are listed on the play guide.

Events

Each finished hand sends bowery:hand-over:

document.addEventListener('bowery:hand-over', (event) => {
  console.log(event.target.id, 'hand over', event.detail.result);
});

This page's events: