Hadronize

Bots

You can create your own Hadronize bots and play against them!

Instructions

Hadronize bots are basically just JavaScript functions that take the current game state as their input and output what action the player should take. To create a new bot, all you need to do is create a new function that implements the strategy that you want your bot to have.

You can change the title, ID, and description of a bot just by editing the elements on the page. The elements have the contenteditable attribute so that you can edit them, and they automatically save all updates to localStorage.

To change the code, just use the code editor (built with Prism). Remember to return your output at the end. You can reference the current state of the game through the state variable. To see an example of the format, click on the collapsible below.

state example

Loading code block...

Once you're finished with your bot, go back to the play page and set a player to use your new bot.

Bot Editor

Bogo (prng)

Chooses a completely random player each time. Not very smart.

Loading editor...