#AGBIC Day 1
After prototyping a decent Othello AI, I'm trying to decide how to represent the Othello board in PICO-8.
- 2D array
pros: intuitive
cons: slow to use
- bitboard
pros: uses bitops on 64-bit nums (fast!)
cons: PICO-8 doesn't have 64-bit nums; will have to adapt
#AGBIC Day 3
Not much to show today in the way of game functionality, but I did add a subtle starfield with 500 random stars.
Not sure if I want to keep it. If I do, I'll likely tone down the number of stars.
But even at this point, it comfortably runs at under 25% CPU.
#AGBIC Day 6
I've added an #animation to the text! This one is a growing/shrinking effect. I also plan to add at least one more type of letter animation.
Next thing on my to-do list is to add more animations to the "game over" state, which tally up disks and proclaim the winner.
#AGBIC Day 8
No progress today, sadly.
But I did find out something fascinating about the "bitboard" approach I'm using: the first video game to use it (and in fact, the first video game, period) was a 1952 checkers program by Christopher Strachey. http://www.alpha60.de/research/programming_enter/DavidLink_ProgrammingEnter_ComputerResurrection60_2012.pdf
#AGBIC Day 11
I spent most of today at a barcade, but I did spend some time theorizing about Apathello.
I want to design an algorithm to count "stable" disks - disks that can't be flipped - but it's been difficult to come up with one. Even doodling an example board didn't help.
#AGBIC Day 12
I'm holding off on designing a "stability" #algorithm, to see how good the #AI can be without it.
I have a #pico8 #Othello AI working with negamax and alpha-beta pruning. It likes mobility, loves corners, and dislikes "frontier" disks - disks next to empty cells.
#AGBIC Day 13
Not much to show in the way of new code, but I'm doing a lot of theorizing.
My Othello AI has to evaluate a ton of board positions, so it would be nice to include a transposition table to store these results if we see the position again. But I'm having trouble!
#AGBIC Day 16
I just sat through a test game between two depth-5 AIs (the hardest I'm willing to include), and I got an "out of memory" error. Had to fix that quickly.
Starting on a title screen/intro screen today! I'll include a way to choose between AI/human for both players.
#AGBIC Day 17
Sadly, no progress today. I slept through most of the day, actually
#AGBIC Day 18
I should really get started on a title screen, but I decided to do something else first.
To save some memory, I'm storing the AI's calculated moves in a different format (a single cell index, instead of a full 64-bit mask). But at first, I almost broke the AI...
#AGBIC Day 19
Working on my dialog system! It now closes when it's done (if I don't specify to keep it open).
I'm also brainstorming what I want the dark void to look like by itself. I don't want it to be entirely dark...but having only a set of twinkling stars seems cliche.
#AGBIC Day 20
Because I'm using #coroutines everywhere, I decided to create a centralized system for them, instead of having like 4 systems that each work differently.
Now it'll be easier to run things like the #AI and the #dialog box at the same time. (Check out that box!) #pico8
#AGBIC Day 22
Holy crap, I just found the subtlest bug in my #pico8 Othello #AI.
I'm using alpha-beta pruning w/negamax, and my alpha starts at 0x8000 (-32768). With each #recursive call, beta becomes -alpha.
Trouble is, -0x8000==0x8000. Which sometimes leads to stupid moves...
#AGBIC Day 23
No more fooling around, time to actually get a title screen done.
I want to have the dark sentient void introduce itself if it's you first time playing, and then I'll transition to a cool-looking title screen.
I've written the introduction. Now to code a galaxy.
#AGBIC Day 24
For the opening cutscene, at first I wanted to represent the dark void with a spiral galaxy animation.
But I think this one fits the context slightly better. It reminds me of neurons & synapses.
Inspired by a #tweetcart from @twitonatrain! https://twitter.com/twitonatrain/status/1650909706020372480
#AGBIC Day 28
My brother asked me to test out different colors. So I showed him a bluescale #palette. This is apparently not what he meant; he wanted to be able to change the disk colors!
Also, I'm testing out #negascout, which on average goes slightly faster than #negamax.
#AGBIC Day 29
You uh...did y-you ever notice how...um, did you uh...ever seen an Othello board and it um...well, it had the um...y'know, the little uh...between the uh, thingies on the...um...y'know?
Well, now Apathello has some little "markers" between a few of the grid lines.
#AGBIC Day 30
Today was the original deadline, and I just got done making sure I had the necessary features (and sound effects!) to release this game as-is.
Now to write the dialogue lines I wanted to include in-game. Wish me luck!
#AGBIC Day 32
I've made some important changes to the AI levels.
First, the different AIs have different weights for certain heuristics (corners, mobility, score diff, etc).
Second, with some probability, an AI may "doubt" its current best move and replace it with a worse one.
#AGBIC Day 33
I slept in for most of the day today, so sadly I didn't make much progress.
#AGBIC Day 34
I've been writing a lot of phrases for the dialog box to say during gameplay.
I imagine this phrase-writing is going to make up most of my progress in the next week or so, so I'll only give updates if I actually change the code from now on.
I've been testing out a few different versions of my Huffman decompression function, to see which runs fastest.
I was able to almost double the performance, at a cost of ~29 tokens and some space for a lookup table.
Prototype hype! (Protot-hype? )
I've written a few dummy categories for messages, and I'm testing out the Huffman encoding/decoding for them. It's coming togeeeetherrrrrrrr...
#AGBIC Day 39
Still fighting against the token limit...but so far I'm winning!
I'm having to token-optimize some functions that, for clarity's sake, I didn't want to. Here's a before and after of one example (317 down to 244).
Anything to get in the dialog feature...
Just realized two things:
1. I can save another 23 tokens by removing a duplicate get_lines_v function I somehow added. (Whoops!)
2. I can save another 3 tokens by adding a helper function shared by the get_lines_b and get_lines_w functions. Not as much as I hoped, but better.
Thread continues here: https://hachyderm.io/@winslowjosiah/110869645786911192
I forgot to post that as a reply to this post. Whoops!