An E-ink display showing Conway's Game of Life, with a solar cell beneath it

Solar Powered Game Of Life Follows The Sun’s Rhythm

Conway’s Game of Life is a beautiful example of how complex behavior can emerge from a few very simple rules. But while it uses biological terminology such as “cells”, “alive” and “generation”, the basic game is too simplistic to be a model for any real-world biological process. It’s easy to add features to make it a bit more life-like, however, as [David Hamp-Gonsalves] has done by giving the Conway’s creation something of a circadian rhythm.

The basic idea is that the speed at which [David]’s Game of Life evolves is governed by the amount of ambient light. The game runs off a solar cell that charges a battery, with the battery’s voltage determining how long it takes to advance the game by one generation. The system is therefore highly active in full sunlight, and grinds almost to a complete halt at night.

An ESP32 runs the simulation and outputs the result to a 400 x 300 pixel e-ink display. The display is extremely power-efficient by its very nature; the ESP’s main processor core, on the other hand, is deliberately placed into deep sleep mode most of the time to save as much power as possible. The Ultra Low Power (ULP) co-processor, meanwhile, keeps an eye on the lithium battery’s voltage as it’s slowly being charged by the solar cell. When the voltage reaches 3.3 V, the main CPU wakes up and computes the Game’s new state. In bright sunlight this happens every few seconds, while on an overcast day it could take minutes or even hours.

[David]’s interesting idea of changing Life‘s activity based on the amount of energy available turns the Game into something resembling a cold-blooded animal. We’ve seen a similar approach in a “solar creature” that runs a Life-life simulation on a seven-segment LCD. If it’s speed you care about however, you’re better off implementing Life in an FPGA.

A solar-powered device with a small LCD screen

Low Power Challenge: LCD Solar Creatures Live On Sunlight, Sleep At Night

With all those e-paper based projects doing the rounds these days, including in our Low Power Challenge, you’d almost forget that monochrome LCDs were the original ultra-low-power display. Without them, we wouldn’t have had watches, calculators and handheld games operating off button cell batteries or tiny solar panels back in the ’80s and ’90s. [Gabor] decided to build a set of gadgets with a 1990s LCD aesthetic, called LCD Solar Creatures. These cute little beasts live on nothing but solar power and provide some amusing animations on a classic seven-segment LCD screen.

The Creatures’ activity depends entirely on the amount of power that’s available to them. If their supercapacitors dip below 3.3 V, their micros enter a deep sleep state and do nothing except briefly flash an LED every now and then as a sign of life. When light hits the solar panel, the supercaps are charged up and the Creatures come to life and display a few basic stats. Once the caps hit 4.1 V, they really start their day and run a few programs, including a Game of Life-style simulation and an animation of Euclidean rhythms. Continue reading “Low Power Challenge: LCD Solar Creatures Live On Sunlight, Sleep At Night”

Old Casio Calculator Learns New Tricks

[George Stagg] recently found himself stung by the burden of free time while in lockdown. Needing a project to keep him occupied, he decided to upgrade his 90s Casio CFX-9850G calculator to run custom machine code.

All [George] really wanted was for his vintage calculator to understand Reverse Polish Notation (RPN). The calculator in question can already run its own version of BASIC, however the bespoke Hitachi CPU struggles performance-wise with complex programs, and wouldn’t be a realistic way of using RPN on the calculator. An RPN interpreter written in assembly language would be much faster.

The first step in cracking this calculator wide open was a ROM dump, followed by writing a disassembler. Incredibly, the MAME framework already featured a ‘partial implementation’ of the calculator’s CPU, which was a much needed shot in the arm when it came time to write a full-featured emulator.

With the entire calculator emulated in software, the plan from here involved replacing one of the BASIC commands in ROM with new code that would jump to an address in RAM. With 32KB of RAM there ended up being plenty of room for experimentation, and uploading a program into RAM was simplified by using Casio’s original backup software to dump the RAM onto a PC. Here, the contents of RAM could be easily modified with custom code, then uploaded back into the calculator.

With RAM to burn, new routines were created to write custom characters to the screen, and a new font was created to squeeze more characters onto the display than normal. [George] ended up porting a Forth interpreter, which defaults to RPN style, to finally achieve his humble objective. He also managed to get a version of Conway’s Game Of Life running, check out the video after the break.

We can’t get enough of our calculator hacks here, so make sure to check out the CPU transplant on this vintage Soviet calculator.

Continue reading “Old Casio Calculator Learns New Tricks”

The Game Of Life Moves Pretty Fast, If You Don’t Use Stop Motion You Might Miss It

Munged Ferris Bueller quotes aside, Conway’s Game of Life is the classic cellular automata that we all reach for. The usual approach is to just iterate over every cell in the grid, computing the next state into a new grid buffer. [K155LA3] set out to turn that on its head by implementing Game Of Life in the hardware of an FPGA.

[K155LA3]’s version uses Chisel, a new HDL from the Berkley and RISCV communities. Under the hood, Chisel is Scala with some custom libraries that know how to map Scala concepts onto hardware. In broad strokes, Verilog and VHDL are focused on expressing hardware and then added abstraction on top of that over the year. Chisel and other newer HDL languages focus on expressing high-level general-purpose elements that get mapped onto hardware. FPGAs already map complex circuits and hardware onto LUTs and other slices, so what’s another layer of abstraction?

The FPGA chosen for this project is a Digilent Arty A7 with a VGA Pmod to turn the RGB444 into analog signals to actually display. What’s impressive about [K155LA3]’s implementation is just how fast it is. Even running at 60 frames per second it’s almost as fast as the monitor can handle. Of course, most computers lying around you could simulate a 60 x4 8 grid at 60 fps. Next, instead of connecting the grid logic to the 60 Hz VGA clock, he connects it to the 100 MHz board external oscillator. Now each pixel in each frame displayed contains over a million generations.

Unfortunately, even this small grid of 60×48 takes up 90% of the LUTs on the Artix-7. In the future, we’d love to see an even larger FPGA hardware implementation capable of handling grids that could hold whole computers in them. And naturally, this isn’t the first FPGA version of the Game Of Life here at Hackaday.

A Computer In The Game Of Life

We often hear the term “Turing-complete” without giving much thought as to what the implications might be. Technically Microsoft PowerPoint, Portal 2, and Magic: the Gathering all are Turing-complete, what of it? Yet, each time someone embarks on an incredible quest of perseverance and creates a computer in one of these mediums, we stand back in awe.

[Nicolas Loizeau] is one such individual who has created a computer in Conway’s Game of Life. Unlike electricity, the Game of Life uses gliders as signals. Because two orthogonal gliders can cancel each other out or form a glider eater if they intersect with a good phase shift, the basic logic gates can be formed from these interactions. This means the space between gates is crucial as signals need to be in phase alignment. The basic building blocks are a period-60 gun, a 90-degree glider reflector, a glider duplicator, and a glider eater.

All the Python code that generates these structures is on GitHub as the sheer size of the machine couldn’t possibly be placed by hand. The Python includes scripts to assemble the basic programs as a bank of selectable glider generators. It’s all based on Golly, which is an excellent program for simulating Conway’s Game of Life, among other things. While this isn’t the first computer in the Game of Life as [Paul Rendell] published a design in 2000 and [Adam Goucher] published a Spartan universal computer constructor in 2009, we think this is a particularly beautiful one.

The actual architecture has an 8-bit data bus, a 64-byte memory with two read ports, a ROM with 21 bits per line, and a one-hot encoded ALU supporting 8 different operations. Instructions have a 4-bit opcode which is decoding in a few different instructions. The clock is four loops, formed by the glider reflectors as the glider beams rotate. This gives the computer four stages: execution, writing, increment PC, and write PC to memory.

The Game of Life is an excellent example of Cellular Automaton (CA). There are several other types of CA’s and the history behind them is fascinating. We’ve covered this field before and delved into this beautiful fringe of computer science. Check out the video below to truly get a sense of the scale of the machine that [Nicolas] has devised.

Continue reading “A Computer In The Game Of Life”

Watch Conway’s Game Of Life Flutter Across A Flip-Dot Display

Like many of us, [John Whittington] was saddened with the news that John Horton Conway passed away a little earlier this year, and in honor of his work, he added the Game of Life to a flip-dot display that he has been working on. The physicality of an electromechanical display seems particularly fitting for cellular automata.

Like what you see? If you’re curious about what makes it all tick, the display shown is an Alfa-Zeta XY5 28×14 but [John] is currently working on building them into a much larger 256 x 56 display. GitHub hosts the flip-dot simulator and driver software [John] is using, and the Game of Life functions are here.

If you’re new to the Game of Life and are not really sure what you’re looking at, [Elliot Williams] tells you all you need to know in his writeup celebrating its profound impact and lasting legacy. Watch the flip-dot display in action in the video embedded below.

Continue reading “Watch Conway’s Game Of Life Flutter Across A Flip-Dot Display”

The Game That Launched 1,000 Hackers

John Conway passed away this week. Even if you don’t know much about mathematics, you will probably know nearly everyone’s favorite cellular automata ruleset: Conway’s “Game of Life”. It’s so much a part of our cultural history, that proto-hacker Eric Scott Raymond suggested using the glider as the hacker emblem.

The idea that a very simple set of rules, applied equally and everywhere, could result in “life” was influential in my growth as a young hacker, and judging from the comments on our article about Conway, I’m not alone. But I won’t lie: I was a kid and thought that it could do much more than make pretty patterns on the screen. I was both right and wrong.

Although amazingly complex machines can be built in Conway’s Life, just check out this video for proof, in the end no grand unifying theory of cellular automata has emerged. As a research topic Conway’s chosen field of mathematics, cellular automata is a backwater. It didn’t really go anywhere. Or did it?

Implementing Conway’s Life in BASIC on a Tandy Color Computer was one of the first things that launched me on my geeky path. It ranks with MENACE: the matchbox-based machine learning algorithm from the 1960’s and an introduction to Markov Chains in the form of a random text generator in my young algorithmic life, all of which I incidentally read about in Martin Gardner’s column in “Scientific American”. Conway’s Life, along with some dumb horse-race game, also taught me about bad random-number generators: the screen would populate the same “randomly” every time on the old CoCo.

So maybe Conway didn’t want to be remembered just for his “Life” because it was a bit of a mathematical dead-end. But in terms of its impact on the world, an entire generation of hackers, and my own personal life, it was able to fill up significantly more than a screen full of pixels. Here’s to Conway, his “Life”, and everyone else who is inspiring the next. You’re not just gliders, you’re glider guns!

This article is part of the Hackaday.com newsletter, delivered every seven days for each of the last 200+ weeks. It also includes our favorite articles from the last seven days that you can see on the web version of the newsletter.

Want this type of article to hit your inbox every Friday morning? You should sign up!

[Game of Life example shown in this article is John Conway’s Game of Life – 1.0 written in Python by Nick Jarvis and Nick Wayne]