A nice book to get into Evolutionary Computation

I always had difficulty when someone asked me what they should read to get started with Evolutionary Computation. As far as I can remember (and I might be forgetting things, it has been 20 years already), I learned EC by reading lots of papers, webpages, short texts, and talking to people, but not by actually reading a textbook. It makes it really difficult for me to help new students retrace my steps.

So I was very happy this week when I read “Evolutionary Computation, A Unified Approach”, by Kenneth A. De Jong (2006). This book is exactly what I would recommend to a new student wanting to learn about EC. It feels easy to read, and focuses on the components of the algorithms, instead of the algorithms itself.

The first chapter describes a very simple and generic EC algorithm, along with the key concepts of EC. The second chapter gives a historical overview of EC, covering ES, GA and EP. The third chapter dives on these algorithms in more detail, and the fourth chapter on the components of EC independently from the algorithms. I really like how the components are compared against each other, specially a discussion on problem representation, which I think is a topic usually overlooked on EC research. There are further chapters on specific problems, theory, and “advanced topics” (multi-objective, dynamic problems), which I haven’t read yet.

It is an old book, so recent algorithms such as CMA-ES, MOEA/D and NEAT are not covered. GP and Alife are also out of scope. I’m surprised that DE is not mentioned either, even though it was published in 97. That said, these things can be easily learned after the getting a solid understanding of the basic concepts, which I think the book delivers very quickly.

A funny thing is that the book has an appendix on code for the algorithms described in the book, but as far as I can tell there is almost no code in the appendix. It doesn’t really matter, since the algorithms are so simple that someone could (and should, for the sake of learning) implement them from scratch using the descriptions in the book.

I will probably try to prepare a short intro to EC summer lecture based on this!

Week 08 Blog — Swamped with Work!

I’m trying something new: A blog in the original sense of the word (web log) — a gathering of thoughts about stuff that happened last week, but for one reason or another did not end up being enough for its own post.

Work Stuff

The big thing last week was me hosting the Alife-Japan Workshop. It was nice, but I took on much more work than I should have, and ended up stressed and exhausted — it basically cost me all of Wednesday and Thursday. Recovering. I need to re-think how I approach these events.

On a better note, on Friday I talked to a new student who is very interested and motivated in learning about GP. After the student who was working on GP graduated, I was looking for someone to carry on the torch on that part of my research portfolio.

This Saturday I participated in the second phase of the University Entrance examination. Almost 6 hours doing nothing but look at kids taking the exam, to be honest it gave me plenty of time to think about what I want to do in the short term future (program a cool pico-8 rogue-like).

What is coming next: This week I’ll have to sort out the three Alife papers which different students are working on, wrap up the lab budget for this Fiscal Year (You have to use every last single cent !!), and start preparing for the lectures in the spring semester.

Gaming Stuff

Spent a lot of time thinking about The Tower, a pretty cool pico-8 game with a bitsy feeling. I think this was the first time I felt really motivated to hack a game to learn more about it. Pico-8 is cool for that.

I have also spent a lot of time playing The Turgenev Study, a neat tiny game by the Punkcake gang. Although I think I’m almost weaning out of this one.

Talking about tiny cool games, I’m keeping an eye on Island Trains, a new “game/toy” that is about creating an island and then building a train diorama on it. Similar in spirit to Townscaper, I guess.

Last week there was a sale of Brazilian games on Steam — I was really looking forward to buying some games, specially because there were quite a lot of sub-500 JPY games made by people from my hometown that I was curious about… But I ended up missing it because of the workshop exaustion… Bleaugh!

Hacking Stuff

Earlier this week I added a plugin to make this blog visible from the Fediverse. It was really cool, although it gave me some trouble to set up. Next time I want to try to make a Fedi bot.

What I’m putting my effort now is on writing a rogue-like game in Pico-8, taking inspiration from LazyDev’s video tutorial. I hope I have something to show for it next week!

New interesting links

This week I learned about Melanie Mitchell’s blog, with some quite interesting discussion on what LLMs are and are not capable of, and why. I’m looking forward to buying her book (An AI guide for thinking people), once I can find it in print.

I hope you found some interesting stuff in there!

The Tower

Last week Mike introduced this neat Jam game to me: The Tower.

The premise is simple. You are climbing a tower with 100 floors. At each floor, you roll a d100. If it is higher than the floor you are in, you go up. If it is lower, you go down.

Screenshot of "the tower" game. Two human characters are in a dungeon-like room, with a bookcase nearby. An upstairs is behind a bubble door. On the right, a text prompt says: "Floor 1, Rolling... need 1+ got 20. Floor 2, Rolling... need 2+ got 85. Floor 3, Rolling... need 3+ got 74.
The beginning of the tower, from the project’s itch page.

What makes this game really fun is the great use of tiles, colors and text.

Each floor is unique, from traditional tower rooms, to parks, to caves, to more weird stuff. In some of the floors you can talk to people who are trying to climb or leave the tower, or just decided to live where they are.

Every floor has only three colors, and there are several visual and audio glitches, giving everything an uncanny vibe. And as you go up, the probability of going up goes down. You slip a few floors, and you start to calculate in your mind how unlikely it would be to get all the way to floor 100. And the game gets more and more glitch-y as you go up.

You start to think: Is there a trick to the tower? Is the dice fair? (Spoilers after the next image. Go play the game)

Animation from "The tower" game. The character talks to a person nearby, who says they want to go up the tower, but need to stay behind to take care of another character. The number 25 in the bottom right indicates this is the 25th floor of the tower.
Climbing a few floors, there are lots of people inside the tower… lost? (Image from the project’s itch page)

The first time I played this game, I went up to floor 43. I wanted to go all the way to 50, since that would be the midpoint where it would be more likely to go down than up, but gave up after a few slips.

I told people how amazing the game was on wandering.shop, and was planning on putting the game behind me, but got a lot of feedback on my suggestion. So last Sunday I decided to give the game a go again, and found out that it was available on the pico-8 BBS. Which means that I had access to the games’ source code. (Real spoilers after the next image)

A picture of heavily obfuscated LUA code, followed by some ascii art.
When you open the source code, you are greeted by an obfuscated mess, and some nice ascii art.

The source code of the game was very compressed. They used every single compression trick they could to fit all the tiles, text and the 100 levels. But it was fun that there was a large ASCII art right at the top of the code, like a welcome mat. I started digging through the code, and soon found the most important thing.

The dice roll is a fair one. No tricks (AFAICT). And it was easy to fix the dice to roll 100 every time. And so I did it.

A screenshot of The Tower game. It shows floor 99. Many doors stand between the upstairs and downstairs.
Floor 99. Good luck going through it the fair way.

Playing with god dice was, to be honest, a scary experience. When you roll a 100 in the game, a little happy tune play. But it seems that every time you roll it, a little counter or something goes inside, distorting things a little bit. Normally you can’t notice it, since you roll 100’s so rarely, but by floor 40 my sound was getting really distorted.

As I climbed the tower, things started to get more and more glitch. The music started to feel like someone scratching a blackboard. fake tiles started appearing everywhere, and sometimes replaced the real tiles. Sometimes they would replace the path or the upstairs, and I had to quit and reload the game.

Was this the game rebelling against my cheat? Or was this the expected experience? How could some one survive this glitch-land going up and down infinitely on fair dice?

The characters also got “glitch-y”, speaking really spooky things. What started as a quirky indie game soon became really creepy.

And when I got to the top…

Well, I will leave that last spoiler for you. If you want, leave me a message and I’ll tell you how to fix the game. But if you know how to use pico-8, it should not be very hard.

Just don’t be stupid and do it late at night like I did! Or do it! Maybe it is better that way :#

Game Review: The Longing

Content Warning: Spoilers for “The Longing” (after the first paragraph), and discussions on suicide.

One of the games that left the biggest impression in me recently is “The Longing”. The Longing is a German indie game, with an interesting premise: The King of the Underworld decided to sleep for 400 days, and created a shade to watch over his kingdom and wake him up after 400 days have passed. You control this shade. The key idea is that the game runs in real time, and time goes on even when the game is closed. So, in theory, you could start the game, leave it, and come back after 400 days to wake up the King and finish the game. Of course, there is much more to the game than this. I highly recommend it! (spoilers after the picture)

Screenshot of the game The Longing. This shows the very start of the game, when the huge king of the underworld holds the shade in its hand, and says: Wake me when the time has come, to end all fear and longing...
The latest technology in alarm clock AI

Of course, the interesting part of the game is how you choose to spend those 400 days. You can walk around and explore the underground kingdom, which is full of rooms with a magical look, beautifully painted, with very atmospheric music. You can collect interesting things that you find in your explorations, and bring them back to your room. One of the coolest little idea in the game is that you can pick up books through the cave and, after you bring them back to your room, you can read those books. The books are actually real world books, such as Moby Dick, and you can even add extra books to the game to read them in your cave — an interesting twist on the e-book reader.

The game part is that, in the beginning, you can only access part of the underground kingdom. Large parts of it are blocked off. To access the blocked off parts, you have to solve little puzzles. Many of the puzzles are time related. For example, one of the first blocks is a pit with a crumbling stalactite above it. When you look at it, the shade comments something like “that stalactite should break and fall in a few weeks”. And, in fact, if you wait some weeks, the stalactite will fall and you will be able to cross. There are other puzzles that require your active involvement, but most of them still require you to wait large amounts of time.

This, along with the very slow, deliberate walking speed of the shade, make The Longing a very introspective game. At least for me, I was often thinking about what it meant to live in such a limited environment where time goes on so slowly. Even with all exploration and puzzles, 400 days is a lot of time. There is a way to make time go by a little faster: If you improve your home by adding decorations to it, time will go a little bit faster when you are inside, and a bit faster still if you read books in a well furnished home. However, at the fastest, the 400 days should go by in about two or three months of real time. (ending spoilers after the next image)

Screenshot for the game The Longing. The Shade (main character) is sitting in a sofa inside a cave, reading a book. The cave has several drawings hanging on its walls, and a small rug under the sofa. The image evokes a cozy feeling.
A nice place to wait for the end of the world.

However, even will all time acceleration options, you should still run out of things to do long before you run out of time. Then what do you do?

One of the core questions of the game is about whether the shade leaves the underworld or not. In the beginning of the game, the shade is told that it can do whatever it pleases, but it cannot leave the underworld. As the shade explores the caves, it starts getting worried that it would displease the King if it keeps going. Of course, many meta-things in the game pointing to “leaving the underworld” as something the player should strive for. But still, the choice to stay is a very valid question inside the game.

The game also allows the shade to take its own life. When I found this option, I was looking for the way out of the caverns, but I took a wrong turn. Then I found myself at the edge of a precipice, where the game zoomed all the way out, tense music played, and a light could be seen at the bottom of the precipice. At that point in the game, I was not spoiled and thought that “getting out of the caves” was a metaphor for the Shade jumping off the precipice. That thought really shook me in a way that no game had touched me before. It was not only that the option of suicide existed, but that it made so much sense: By that time in the game, I had finished exploring most of the rest of the caves, and turned my house into a very comfortable place. I had everything that I wanted but at the same time nothing much else to look forward to other than to spend my time doing nothing until the end of time arrived. It echoed a lot of life questions that I had on my mind. To see those questions reflected in the game, I had to turn it off and put it down for a few days.

When I came back, I decided to spoil myself in that question (was leaving the caves a metaphor for suicide?) and found out that no, I had just missed a turn in another part of the cave that I did not notice. Suicide in The Longing was a only a shortcut to a bad ending. My impressions were nothing more than me putting my own baggage into the game. Still I found it interesting that a game could serve as a vessel for such deep reflections.

Making the ActivityPub wordpress plugin work

After I installed the ActivityPub plugin, I couldn’t actually find myself from the Fediverse. WordPress “sitehealth” tool gave me an unhelpful message that my webfinger was not returning valid JSON.

In fact, it was not returning anything at all! Searching for my website on “https://webfinger.net/lookup” returned a 404 result.

After a lot of online searching, I figured the problem (with the help of the ActivityPub github discussion board) – I had not set up pretty permalinks in the blog.

The solution was to change my Apache configuration to allow redirects. I did this by changing the configuration file for this website with the following info:


(... other configurations ...)
AllowOverride all

That did the trick!

If you have the same problem as I do, but you cannot change your apache configuration, another workaround is to manually create the webfinger file, following this thread.