Close

Update: computer player with "random" moves

A project log for Electronic Mancala++

Updated version of my Electronic Mancala Board that uses a ATtiny3224 microcontroller

zachary-murtishiZachary Murtishi 01/31/2025 at 01:410 Comments

As a test, I've implemented a test computer player that makes all its moves based on a PRNG value. The PRNG is generated by a 16-bit Fibonacci linear feedback shift register with taps at bits 15, 13, 12, and 5 that is cycled three times per 1ms system tick to generate a "random" 3-bit number to apply a modulo 6 to. This isn't perfect, but it works enough for testing. This mode can be selected by moving SW0 to the OFF position; regular two-player mode may be selected by placing SW0 in the ON position. The debug LED will light in the case that the computer player is selected. I've uploaded the source for a test build.

Discussions