Evening Rust: Episode 17: Scoring Code 4 Life

Edaqa Mortoray
Mortoray
Published in
1 min readFeb 23, 2018

We start our AI quest in Code 4 Life.

First step is refactoring our logic to return a `Turn` object, which can emit the actual game instruction.

Next up is enumerating all possible moves we can make. To test this we just play at random — and surprisingly beat some bots!

Then we try to get to scoring, but first up is the ability to apply steps. This is essentially programming the real game logic.

Watch live on Twitch.

--

--

Edaqa Mortoray
Mortoray

Stars and salad make me happy. I‘ve been writing, coding, and thinking too much for over 20 years now.