Search This Blog

Explore Simple Game Algorithms with Color Walk: Part 4

In this series we are taking a look at different game algorithms using the simple game Color Walk as a sandbox for exploration and discovery. The last post showed how to add multiple algorithms and select between them, as well as exploring a random choice algorithm and an enhanced way to skip useless choices for both round-robin and random choice. This post will get into our first non-trivial algorithm, the greedy algorithm. Greedy algorithms don't care too much about the future. They will look at the choices immediately in front of them and try to pick the choice that will get them the most stuff right away. That's why they're called greedy, you see? In this case, the greedy algorithm will pick the color that will remove the most blocks on the next turn. Let's see how it stacks up to the trivial algorithms.

Explore Simple Game Algorithms with Color Walk: Part 3

In this series we are taking a look at different game algorithms using the simple game Color Walk as a sandbox for exploration and discovery. The last post showed how to implement one of the simplest algorithms I could think of, round-robin, and how to develop some tooling around the game so that we can quickly run through multiple iterations in a batch mode and see statistics on the run. This post will start exploring some more algorithms, and we'll start needing to think about how to improve the algorithms so they aren't so naive.

Explore Simple Game Algorithms with Color Walk: Part 2

In this series we are taking a look at different game algorithms using the simple game Color Walk as a sandbox for exploration and discovery. The last post was an introduction that described what Color Walk is, explained how to get it running on your own setup, and presented some brainstorming of possible algorithms to explore. This post will start digging into the simplest of those algorithms: round-robin, but first, we need to build up some tooling around the Color Walk JavaScript code to make it easier to test out our algorithms and benchmark their performance. We'll use the round-robin algorithm as a vehicle to help develop this tooling, so we have something to play with while getting the benchmark tooling up and running.

Explore Simple Game Algorithms with Color Walk: Part 1

A few years ago, Jennifer Dewalt did a project where she created 180 websites in 180 days, one every day for half a year, to learn how to program. These "websites" were actually web pages within one website, but the plan and the execution were still quite amazing. I watched on and off as she created page after page, learning all about web development in the process. One page in particular caught my interest: the simple game called Color Walk.

In this game there's a 20x30 grid of colored blocks in five different colors. The top left block is blank, and there are five colored buttons to choose from. Click a button, and the blank space will expand by removing the adjacent colored blocks corresponding to the button clicked. The goal is to clear the board in as few clicks as possible.

Color Walk screenshot
Color Walk by Jennifer Dewalt

What Can One Do in a Year?

One year. Three hundred sixty-five days. Eight thousand seven hundred sixty hours. Seems like a lot of time, right? Where does it go, and what do we do with it all? If you're like me, you might spend the majority of that time sleeping, working, spending time with family and friends, doing chores, and eating, in roughly that order of time consumption. When all is said and done, I have about two hours a day of leisure time that I can do with as I please, although not every day. Maybe 300 days out of the year, let's say, I can do self-driven activities.

A Barely Adequate Guide to the Google Blogger API using Ruby

For some time now, I've been wanting to do some things with this blog that are just too tedious to do by hand. For instance, I'd like to download all posts with pictures to have a local copy, you know, just in case. Google leaves a bit to be desired in this regard with its backup feature. I would also like to get a word count of all of the posts I've written, just because I'm curious. These things would be done best with an API, so that's what this post is going to explore.

Chess Book Face Off: Best Lessons of a Chess Coach Vs. Pandolfini's Endgame Course

In my recent efforts to continue to improve at chess, I've read through a couple more books on the subject. As always, I read books in pairs so that I can get multiple perspectives on a topic and learn it more thoroughly. Sometimes the books cover nearly the same material, and other times—like in this case—the books are only loosely related. The first book is Best Lessons of a Chess Coach by Sunil Weeramantry, a FIDE Master and highly successful chess coach. This book is the kind of book that explains a handful of games in intimate detail. The second book is Pandolfini's Endgame Course by Bruce Pandolfini, a USCF National Master and a more famous highly successful chess coach. Being a book about endgames, it does not go through full games, but contains an extensive collection of endgame positions to study. So both books were written by accomplished chess masters and coaches, meaning they have at least that in common.

Best Lessons of a Chess Coach front coverVS.Pandolfini's Endgame Course front cover