A week in a minute
Players the computer plays go through seven days of Kail, here in your browser. You set how much NEAR the prize vault starts with and how many players there are; the rules, the fees and the sea are the game's own. Nothing is sent anywhere, and nothing here is on the chain.
The week
Luck: the game has chance in it (which fish swim by, what a chest holds, who wins the draw). The luck number is like a numbered set of dice: number 1 always rolls the same way, so the same settings with the same number give exactly the same week, and anybody can check the numbers. “Play with other luck” takes other dice: the same game and settings, a different week. What stays the same with every luck is the game; what changes was luck. Every player comes with 10 NEAR, what the testnet faucet gives.
Press “Play the week”. Each day takes about eight seconds.
While it plays, this line shows what one player after another decides, in the player's own words.
How it moved
Coins are bought with NEAR and pay for bait: one bait is 2 coins, and a quest takes about 44 coins of bait. The contract sets the price of a coin anew every day, from that day's prize: the bigger the prize, the dearer a coin, so that a ticket costs about what it is worth. The NEAR paid for coins goes into the prize vault.
Day by day
Prize: what a full draw could pay that day, a fifth of the prize money when the day began; a winning ticket gets a hundredth of it. Earned: tickets from quests. Fish: how many changed hands. Fees: NEAR paid to NEAR's network that day, by the players and by the game's server.
The players, by character
Every player is one of ten characters, each with its own way of playing. NEAR each: what a player of that character has more or less than the 10 NEAR it came with, on average, counting what it is owed.
Where all the NEAR is
Counted to the last yoctoNEAR after every day, and shown here to a millionth of a NEAR. The two totals are always the same number: NEAR only moves, by a rule of the contract or as a fee to the network.
What the players decided, and why
- The players' decisions are listed here as the week goes, newest first.
The books
After every day everything is added up: NEAR, coins, tickets, fish. A tick under a day means nothing appeared or vanished without a rule for it.
The same week from the command line: npm run simulate. The model is src/model.js, the players' rules are src/npc-rules.js, and npm run verify checks the model against the contract on NEAR.
What is real here, and what is not
The same as in the game on NEAR
- Every rule of the contract: prices, the quest, the vault, the draw, both markets. What the contract refuses is refused here.
- The network's fee for every step, as measured on testnet: a cast 0.00028 NEAR, handing in a quest 0.00047, a top-up 0.0004, buying a fish 0.00055. A catch is written down by the player's own transaction (0.00033; a chest 0.00057), with the server's approval. Holding a draw costs about 0.0005, and the vault pays that itself.
- The sea and the hook: the game's own code, in the same steps of 1/240 of a second.
- How the computer's players think, and how long they pause between one step and the next.
Not the same
- The players are ten computer characters, repeated. People would play differently.
- Chance comes from the luck number, not from the chain.
- Fees are counted at the network's usual price; on NEAR a step can cost a few per cent less.