Home › JWorld Blog

Bots Play First: How the JWorld Team Tests Difficulty Before Any Human Does

JWorld team ·

A dev note on the bot simulators behind Arrow Sweep, Dokkaebi Tavern and Dokkaebi Night Parade: which bots we build, which numbers we read, and where a bot told us our design was wrong.

Difficulty is hard to set by feel. A level that "should be fine" turns out boring, or turns out to be a wall. And we cannot call in human testers every time we change one number.

So the JWorld team builds a bot simulator for every game before anything else. It runs the rules without a screen, so a change to a price or a multiplier shows its effect in seconds. This note explains how that works. Every figure comes from the games' READMEs, design notes and simulator scripts.

Rules and screen live apart

Simulation is possible because of one structural choice. Game rules live in a core folder that knows nothing about the screen (the DOM). The screen only draws what the rules return. Time is not read by the engine either; it is handed in as tick(state, seconds).

That means the code a human plays and the code a bot plays are the same code. A bot that simulates 90 days uses the same rules as the shipped game. Dokkaebi Night Parade goes one step further: the same bot objects drive both the simulator and a development hook in the browser, so a simulated run and a real on-screen run can be compared one by one.

Not one bot, but a ladder of bots

The key principle: a single perfect bot cannot tell you how hard a game is. A level that an optimal bot solves in a blink can still be brutal for a person. So we build bots of different skill.

Arrow Sweep has this ladder:

BotWhat it doesWhat it measures
naivetaps the first free arrowwhether mindless tapping earns three stars
greedytaps the arrow that sweeps the mostwhether the obvious move is the right one
2-steplooks one tap aheadwhether a slightly thoughtful player reaches par
human30% a random arrow, 70% the bigger sweep of two random arrowsa typical player's star odds
smartthe exact solverpar itself

These bots also decide which boards are accepted. In the easy world a naive bot must not collect three stars. In the hard worlds even a greedy bot must miss par. Trap boards are chosen so that the most tempting tap costs exactly one extra tap.

Arrow Sweep board 2-11 with Taps 0, Par 6, three empty stars, and undo, hint and restart buttons at the bottom.
Arrow Sweep board 2-11 with Taps 0, Par 6, three empty stars, and undo, hint and restart buttons at the bottom.

Reading the human bot's numbers

The Arrow Sweep README lists, for every world, how the human bot does on the boards we kept. We pick boards so these land inside target bands.

WorldHuman, 2+ starsHuman, 3 starsNaive bot gets 2 stars
W10.990.55n/a
W20.800.210.09
W30.780.110.18
W40.810.060.04
W50.800.050.04

The pattern is deliberate. In World 1 nearly everyone gets two stars and more than half get three. By World 5 the human bot gets three stars on roughly one board in twenty. Two-star odds stay near 0.8, so harder worlds still feel clearable. The table is checked against the design document's targets within ±0.04, and the whole pace run takes about a minute, so we can redo it every time boards are regenerated.

Idle games: simulate the visiting pattern

An idle game like Dokkaebi Tavern is not about one level. It is about days. Its bot imitates someone who drops in a few times a day:

  • One long first session of 60 minutes, plus 8 minutes that evening.
  • Then four visits a day, 6 to 8 minutes each.
  • Time away is paid out by the real offline rules.
  • One tap per second, and always the best-value purchase.

Ninety simulated days take about 40 seconds. The README's results look like this:

MilestoneBot result
First move to a new town5 minutes
Hanyang Marketday 10
Dokkaebi Marketday 14
Glutton levels 30 / 60 / 120days 10 / 20 / 40

We write the target pace first (first 30 seconds, 15 minutes, first day, weeks two and three) into the design document. When the simulator drifts away from it, we change prices or multipliers.

The Tavern tab of Dokkaebi Tavern: 584M coins, 1.3M per second, Rumor 12, and a list of recipes and purchases below the tavern scene.
The Tavern tab of Dokkaebi Tavern: 584M coins, 1.3M per second, Rumor 12, and a list of recipes and purchases below the tavern scene.

Where the bots caught us

A simulator earns its keep when it says the design is wrong. Three real cases:

  • A runaway feedback loop. Moving town gives a reward, the reward raises income, and income raises the next reward. When Rumor was a square root of lifetime income, the bot's progress exploded. We switched to a cube root and capped how many dishes each town may sell.
  • A new system pulled everything forward. The first Glutton upgrades cut the time to reach a town from 15 days to 10. We trimmed the main-game bonus to +5% per level and raised the town requirements.
  • The bot was too smart. Our first-13-minutes table used a fast bot, and it disagreed with what blind playtesters did. So we added a human-like bot, PERSONA: it looks around every 12 seconds and only notices a new button after it has been on screen for 150 seconds. With it, the first move becomes available between 6:38 and 9:53 (p10 to p90) instead of being reached by only 1 run in 30.

The third case matters most. If the bot is faster than a person, the simulator says everything is fine when it is not. Making the bot slower and clumsier is part of the engineering.

Action games need a bot that stands still

In Dokkaebi Night Parade, standing still charges your ward. Its simulator therefore has bots built around that rule:

BotMovement
smartfull information; dodges, collects gems, pauses when ghosts are far
nsnever still (the baseline for how much standing still helps)
asnever moves
randoma new random direction every 0.5 seconds
hbhuman-like: 0.25 s late, ±15° of noise, sees only what is on screen

Comparing the bot that stops with the one that never does shows, in numbers, whether the standing-still rule is a real advantage. Card picks are modeled too: a novice picks at random 35% of the time, a learned player 10% of the time and takes evolution partners first.

What bots cannot do

A bot cannot tell you whether a game is fun. It checks promises written in numbers: pace, star odds, survival time. That is why every game still goes through blind playtests played like a stranger would play. The bots are the filter; the final judgment comes from people-like play.

Summary

  • Keep rules (core) separate from the screen, so bots and people run the same code.
  • Build a ladder of bots: an exact solver for par, a human-like bot for star odds.
  • For idle games, simulate "a few visits a day" and run 90 days in about 40 seconds to check milestones.
  • Bots find runaway reward loops early; switching a square root to a cube root was one such fix.
  • A bot faster than a human cannot be trusted, so we build deliberately slow, clumsy ones too.
  • Bots are a filter. Playtests decide whether it is fun.

To feel the numbers yourself, try Arrow Sweep and Dokkaebi Night Parade, and see whether the star odds and survival times match our tables.

Written by the JWorld team from our game design documents and measured play data, with AI tools helping with the writing.

More posts

A Daily Puzzle With No Server: How One Date Gives Everyone the Same Board

How the Daily Run in Frame Breaker hands every player the same ball and bricks without a server, with the score formula, the clock-cheating rules behind the streak, and the emoji result you can share.

dev notesdaily challengeFrame Breaker

Joseon's Beacon Fires (Bongsu): A Signal Network of Smoke and Flame, and Hwacha Fortress's Beacon Levels

How Joseon beacon towers sent warnings by day and night, what one to five signals meant, and where the beacon levels in Hwacha Fortress copy history and where they do not.

culturebongsuHwacha Fortress

Hanpan AI Ladder Guide: What Changes Across the 20 Gomoku and Janggi Opponents

A level-by-level look at how each Hanpan AI opponent plays, what the 3-star goals ask for, and what to do when a level has you stuck, using the in-game wording.

guideHanpangomoku

Saving Without Accounts: How Our Games Keep Your Progress on Your Device

The save rules the JWorld team uses so progress survives with no login: the save format, version numbers, recovering a broken save, and moving between devices with a save code.

dev notessave datadesign