Page 2 of 2

Re: Mastermind (tm) - Pool reduction and Minimax algorithms

Posted: Tue May 12, 2026 10:16 am
by mnfisher
Oh - and Dungeon Master.....

Happy Days!

Re: Mastermind (tm) - Pool reduction and Minimax algorithms

Posted: Wed May 13, 2026 8:58 am
by chipfryer27
Pyramid for the TRS-80 ??

I really cannot be bothered with modern games / consoles at all. Do zero for me as I think life is too short to bother with this rubbish :)

Huge industry though. Maybe if I had no job or interests I would favour more? Much rather figure out how to get hedgehogs into my garden than have them bounce off a cloud to catch a floating gold ring or the like.

Regards

Re: Mastermind (tm) - Pool reduction and Minimax algorithms

Posted: Wed May 13, 2026 9:35 am
by mnfisher
Yes. Dungeon Master was 1988 and probably the last game i played a great deal. It was more exciting times in computing though - the Amiga (and Atari ST) coming in the last years of the real fun (starting with the ZX spectrum (or Zx80/81 though a bit more frustrating))

Just found a copy of HiSoft Pascal - wonder if I can get it running on a Pi emulator? Not sure i even have a tape deck now?

Re: Mastermind (tm) - Pool reduction and Minimax algorithms

Posted: Wed May 13, 2026 11:49 am
by chipfryer27
Hi Marin

I definitely have tape decks. Still listen to my C90's (remember C30, C60, C90 go!).

If you have tapes I could convert to mp3 for you.

I tried for ages to find tapes of TRS-80 programs, but never found anything. I would even have bought second hand as I am sure with DSP even really terrible recordings could be regenerated. That would be a really excellent project for a Flowcode SysBlock. It would be a breeze for it methinks.

Regards

Re: Mastermind (tm) - Pool reduction and Minimax algorithms

Posted: Wed May 13, 2026 4:06 pm
by mnfisher
Thanks for the offer - might need it when you are the right way up again :-)

So far tried the 'baremetal' emulator on a Pi3 - with no joy (no anything at all :-( ) When I have a few minutes will try the 'fuse' emulator...

Martin

Re: Mastermind (tm) - Pool reduction and Minimax algorithms

Posted: Wed May 13, 2026 4:27 pm
by mnfisher
I pulled the bit array to a new component - which I called bool_array. I think BitArray would probably be a better name - but for now it remains.

I made it a bit more Flowcode - it simulates (though it would be a lot of single stepping!) - and it doesn't return a 'pointer' - it just uses an internal one for the bitmap - this means that each instance of the component can only handle a single bool array - but means that the user doesn't need to pass a handle (or size). Probably a 'really' Flowcode version would have a size as a property - and create the array at compile time rather than runtime.

I changed from a 32 long word division of data - to a byte - which should be quicker on 8 bit MCUs - and the esp32 has horsepower to spare - there could be a choice, either user or depending on MCU?

So - a bool array... If I do bool x[1024] - then I have a bool array BUT it uses 1024 bytes (1 byte per value) - here we use 1 bit per value (so 129 bytes in this case - I cheat on rounding)

Then I removed the bit handling code from 'mastermind' and replaced with this component. Fortunately it still works :-)

A question:

To get around the name 'mangling' - I use (for example) .map = map to copy the global to a local and then use FCL_MAP. Is there a better way?

Martin