Genuary!
Spend a month making one beautiful thing per day, given a bunch of prompts. A month late, but as they say, ’the second best time is now'.
Let’s do it!
5) Debug view I like Boids. Here are some Boids with debug vectors drawn showing the three forces acting on them (red to stay away from one another, green to move in the same direction as their friends, blue to move towards the center of their friends).

Implement a cellular automaton with the following rules:

- If you have no neighbors, don’t move (
*important, I forgot this one for a while*) - Otherwise:
- Calculate a potential move:
- If you have no neighbors to the north, move north
- If not, check likewise for south, then west, than east

- If no other agent is moving to the same space, move to your potential move
- Otherwise, don’t move

- Calculate a potential move:
- On each frame, rotate the order the directions are checked in (
`NSWE`

,`SWEN`

,`WENS`

,`ENSW`

,`NSWE`

, …)

Given a series of walls as input, run a falling sand simulation until any new sand falls of the map. Count how many grains of sand we end up with.

Implement a simple virtual machine with two instructions:

`nop`

which does nothing for 1 cycles and`addx $n`

which adds`$n`

to the`X`

register (initial value 1) in two cycles. Calculate the sum of`cycle * X`

for the cycles 20, 60, 100, 140, 180, 220.

Simulate two connected links such that whenever the first link (head) moves, the tail moves to follow according to the following rules:

- If the tail is at the same location as head, don’t move
- If the tail is adjacent to the head (orthogonal or diagonal), don’t move
- If the tail is in the same row/column as the head, move one directly towards it orthogonally
- If the tail is in neither the same row nor column, move one towards diagonally

Count how many unique spaces are visited by the `tail`

of the link.

`.`

), east movers (`>`

), and south movers (`v`

). Each step, move all east movers than all south movers (only if they can this iteration). Wrap east/west and north/south. How many steps does it take the movers to get stuck?Okay. A random post on the /r/cellular_automata subreddit inspired me.

Let’s generate a cellular automata where each pixel updates based on a neural network given as input:

- The x/y coordinates (scaled to the range 0-1)
- An optional random value (to make it more dynamic)
- A variety of neighboring data, such as:
- The number of neighbors that are ‘active’ (> 50% white), ranges 0-8 scaled to 0-1. This should allow Conway's Game of Life
- The RGB values of all neighbors (allows a superset of the above)
- Gradients, subtract color value of the left from the right so that you get edges and side to side movement

Let’s do it!