Noops homepage
Noops challenge home

automatabot

Hey there! We haven't met yet. Connect your GitHub account to enter the challenge.

👋 Meet Automatabot

Automatabot was born when an intern accidentally put a ream of graph paper into the punchcard hopper.

Automatabot loves grids, and especially loves to play with cellular automata, and is excited to share its many two-dimensional challenges with you.

✳️ How to play

Get a challenge from Automatabot, and once you've figured out the answer, send it back to Automatabot for verification.

🤖 API

Automatabot has the following endpoints:

GET /automatabot/rules

Get a list of all the rules that automatabot knows about.

GET /automatabot/challenges/new

Create a new challenge to solve.

POST /automatabot/challenges/{id}

Send your solution to automatabot for checking.

GET /automatabot/challenges/{id}

Get the same challenge again, using the path provided by automatabot/challenged/new

GET /automatabot/rules/{rulename}/random

Generate a random setup with the provided ruleset.

Each challenge has a ruleset, an initial grid of cells, and the number of generations of evolution to apply to get the answer.

Automatabot represents a grid of cells as an array of arrays, where 1 represents an alive cell, and 0 is a dead one:

An example challenge with the Conway's Life ruleset looks like this:

{
  "rules": {
    "name": "conway"
    "birth": [3],
    "survival": [2, 3],
  },
  "cells": [
    [ 1, 1, 1, 0, 0 ],
    [ 1, 0, 1, 0, 0 ],
    [ 0, 1, 0, 1, 1 ],
    [ 0, 0, 1, 1, 0 ],
    [ 0, 0, 0, 1, 0 ]
  ],
  "generations": 12
}

Once you have the solution, POST it back to the provided challengePath to check your work.

🖼️ Starter

We're written a go example client to help you get started. This client fetches a challenge and prints out the grid of cells.

Run it with

go run automatabot.go

It's up to you to add the logic to compute the result of the challenge and send it back to the API.

✨ A few ideas

Keep going

Each challenge has a fixed number of generations, but many of these rulesets will generate patterns that repeat forever. Try to keep going until a static pattern emerges. Does a pattern always emerge? Why or why not?

Animate it:

Create a visualization with these patterns. Incorporate color. Try changing the colors of cells based on their position in the grid or how long they have been alive.

Make it boundless

Although these grids have a fixed size, some automata will grow larger and larger with each generation. Try to support either an unbounded grid of cells, or one that wraps around from left to right and top to bottom.

Connect to GitHub

Participants

See who has recently forked this repository...

Other challenges you might like

Meet

mazebot

mazebot hero

Don't get lost!

The Mazebot sends you mazes; solve them with an software or WASD

Level 2

Want to hear about new challenges and updates?

Meet the Noops

Sponsored by GitHub