The Botkits Are Coming

by vera

When an onchain game (dare I say autonomous world?) reaches maturity, the core developers transition from building contracts and client code to building tooling for third-party developers to create plugins and bots. It’s a sign that the game mechanics are ossifying, the emergent behavior has surfaced, and the real fun can now begin.

Words3, the madcap onchain iteration of Scrabble (if Scrabble were built by a futures trader with a sweet spot for VRGDAs) has reached the botkit stage. The game was developed last November, using MUD v1, and has since undergone a port to MUD v2 and various quality-of-life upgrades in preparation for its mainnet launch this past week. In a catch up with Small Brain this Wednesday, we discussed what’s next for the game, which recently had a 4-day run on Base, with over 120 wallets participating, a ~$22,000 prize pool, with more games planned in the future.

The Words3 board at the end of the most recent match
The Words3 board at the end of the most recent match

For those who didn’t get the chance to play Words3, a brief recap of the rules: you connect your wallet to the client and immediately access an infinite board, along with all twenty-six letters of the alphabet, each of which are priced based on demand. The prices of letters increase (or decrease) according to an exponential function benchmarked against an expected future price, which means at any given point in time, a letter may be more or less expensive. Like Scrabble, you place your letters on tiles to create words; unlike Scrabble, anyone can play a word at any time (and of course, instead of drawing letters randomly, you purchase them directly). You get points for your words, plus additional 2-5x letter multipliers for playing on certain squares. At the end of the match, whether you win an allocation from the prize pool is determined by the number of points you’ve earned, adjusted by the total profitability of the words you’ve played.

In the most recent match, we saw some primitive bots and plugins begin to emerge. Yonada built a Words3 stats client that showcases the most played letters, best plays, points distribution across players, and the MUD tables configured by Small Brain. Saucepoint (who reached the top of the Words3 leaderboard) built a point multiplier calculator using the game dictionary and a custom python script, which advised him on the best words to play. At one point, saucepoint reflected, “If I knew how to read MUD contracts, it would’ve been possible to construct perfect sequences. Maybe even bot the game with auto submissions.” This is where Smallbrain’s upcoming botkit will likely come in.

The script saucepoint created to calculate profitable Words3 strategies
The script saucepoint created to calculate profitable Words3 strategies

To understand the power of the botkit, we first need to understand how the Words3 contracts work, and how they interact with the Words3 client. The logic for playing a word on the Words3 board is handled by the PlaySystem. When you call the “play” function from the client, various inputs are submitted: the letters you played, a client-side Merkle proof that checks that the word you played is in the English dictionary, the coordinates of where the word starts and ends, the direction you played the letters (left to right), and bounds (a struct) that check other letters above and below the word you played to see if other words can be formed around it. Bounds also have a provision for client-side Merkle proofs, because they need to check for valid words as well.

In order to call the game's play function, the client must generate Merkle proofs, which are used to verify the move's validity onchain
In order to call the game's play function, the client must generate Merkle proofs, which are used to verify the move's validity onchain

For someone trying to create a bot or custom client for Words3, this kind of client-side complexity can be daunting. It’s labor intensive to make moves, because you need to determine the words you're playing, and then create word proofs and bound objects for every word from the client itself. To alleviate this complexity, the botkit will allow users to provide just their word, and letter coordinates and direction, and it will fill in the Merkle proofs and bounds for you. Because MUD automatically gives you state syncing from the client, players can use the botkit to deploy more complex logic, with no knowledge of lower level MUD details (like the MUD config) required. In future rounds we might see saucepoint (who fessed up to being a MUD novice) launch an auto-submission bot using Small Brain’s botkit. We might see bots that simply evaluate the board and harvest high scoring words with minimal expense, just by playing the letter “S” on words that can be plural. Or we might see entirely new, more professionalized clients begin to emerge.

When implemented, the botkit will essentially be the MUD minimal package, with the Words3 contracts plugged in. It will show you how to set up a basic MUD project and will deal with all the idiosyncrasies of the Words3 smart contracts. The botkit is essentially a way to abstract away needing to know MUD, or the way that Words3 handles logic across the client and smart contracts. It’s a layer on top of MUD that converts state updates into a more readable format for a developer.

In a world where Words3 clients proliferate (one dream Small Brain has is to see a Bloomberg Terminal for Words3 built by an ardent fan of the game), clients themselves will be able to monetize. This is one possible endgame for the botkit: it’s not just a way for you to optimize winning strategy for yourself, but a way to get your custom client into the hands of many users who are willing to pay for an upgrade (some of whom may choose to further optimize the client for their own use).

In addition to the botkit, Small Brain is looking at other improvements to Words3 gameplay. This past round was the first time players could use point multipliers. Upon reflection, Small Brain thinks the liberalness with which multipliers were spread across tiles may have been a mistake; it was simply too easy for players to get massive point multipliers, and quickly climb up the leaderboard (so perhaps without multipliers, saucepoint will need to find a new winning strategy). Letter pricing with VRGDA mechanics may also need to be tweaked: the constant Small Brain used for the target price of letters was likely too small, which led to surging letter prices on day two of the game. Small Brain is also considering an extension of the length of round gameplay, or multiple rounds where each game impacts the next one in unexpected ways.

Still, the botkit remains the key focus for Small Brain. And for us, it’s an exciting new possibility for what MUD can enable – and a new layer of digital physics that can be unleashed. In addition to providing software to users to easily deploy complicated onchain applications, MUD can also provide the rails for botkits that yield new and unexpected forms of onchain play. For every MUD app, let a thousand clients bloom.

To learn more about Lattice and MUD, visit our website, read our documentation, or join our Discord server

Thank you to ludens, biscaryn, and Small Brain for feedback on this piece

Subscribe to The New World
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.