|
Forum Index : Microcontroller and PC projects : MMbg PC3 - a complete backgammon program in MMBasic
| Author | Message | ||||
| homa Guru Joined: 05/11/2021 Location: GermanyPosts: 723 |
![]() https://youtu.be/x2N5_EjmmYE Hello to all PC3 owners! I'd like to introduce MMbg PC3 - a complete backgammon program for the Pico Computer 3. Features - match play 1 to 15 points with doubling cube and Crawford rule - uses the neural nets of GNU Backgammon: the "big" engine plays at about gnubg "Expert" level (0-ply) and wins ~47 % of 5-point matches against gnubg "World class" (2-ply), measured over 1236 matches - written completely in MMBasic - no CSUB needed - HDMI graphics (MODE 3) with smooth animation, plus an ASCII board on the serial terminal - keyboard or USB mouse, multi-level undo, auto save and resume - .mat export and GNUbg IDs for analysis in gnubg, optional sound - for tinkerers: gnubg on a PC as opponent over WLAN, overnight test runs Requirements PC3 with firmware PicoMitePC3 V7.00.00 RC2 or later. Installation Unzip the ZIP onto the SD card, then: CHDIR "B:/mmbg" LOAD "mmbg_pc3.bas", C RUN The manual (English and German PDF) is included. The version for the PicoCalc (PiCa) will follow ... Have fun playing and testing! Please report all bugs here. Matthias MMbg_PC3.zip |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 6195 |
Wauw Cant wait to Try it out. Volhout Edited 2026-10-20 15:07 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
| PilotPirx Senior Member Joined: 03/11/2020 Location: GermanyPosts: 164 |
That's great, I'm looking forward to the PicoCalc version. Does it also require MMbasic V7? If so, I'll have to update. |
||||
| javavi Guru Joined: 01/10/2023 Location: UkrainePosts: 621 |
Great, I really liked your game. I lost five times in a row. It must have a really good built-in opponent, or maybe I'm just a bad player, probably because I've always played the Eastern version of backgammon. :)) By the way, is it possible to make a game using the rules of Eastern backgammon? Thanks. |
||||
| homa Guru Joined: 05/11/2021 Location: GermanyPosts: 723 |
Hi Javavi, Thanks a lot for your kind feedback! I'm really glad to hear you enjoyed playing the game (even if the AI gave you a tough time! :)). To answer your question about adding Eastern backgammon rules: to be honest, I'm not familiar with all the specific details and variations of Eastern backgammon. More importantly, the game's strong AI is based on the gnubg neural network, which was trained strictly on the standard Western rules. Teaching an AI to play Eastern backgammon would require building and training a whole new neural network from scratch for those specific rules. That isn't something I am planning to pursue for this project right now. However, the code is open for anyone who would like to adapt it or implement those rules themselves! Matthias |
||||
| PilotPirx Senior Member Joined: 03/11/2020 Location: GermanyPosts: 164 |
I have the Pico Computer 2B FW V7.0.00b3 with 6MB PSRAM and 16MB Flash. MMBG starts wit ERROR "Not enough memory". Is there anything I can do about it? I changed to V7.00.00RC3 but same Error Edited 2026-10-23 22:23 by PilotPirx |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12051 |
Matthias Great work PilotPirx You don't stay what variant of the firmware - HDMIUSB?. Also try updating to the latest version. Edited 2026-10-23 22:28 by matherp |
||||
| homa Guru Joined: 05/11/2021 Location: GermanyPosts: 723 |
Thanks for trying MMbg! The current version is made for the Pico Computer 3 only (PicoMitePC3 firmware, 256 KB program memory, PSRAM). The PC2 has less RAM, so MMbg runs out of memory there. At the moment I'm working on the PicoCalc version, which has to get by with much less memory. Once that is done, a version for the PC2 should be possible too - but please be patient, it can't be done quickly. Matthias |
||||
| PilotPirx Senior Member Joined: 03/11/2020 Location: GermanyPosts: 164 |
matherp Yes, PicoMiteHDMIUSBV7.00.00RC3 Is it possible to get more program memory? |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12051 |
Just tested works perfectly with RC3. Did you load the program with LOAD "mmbg_pc3.bas", C as in Matthias' post and in the program header? The ,C is critical |
||||
| PilotPirx Senior Member Joined: 03/11/2020 Location: GermanyPosts: 164 |
matherp One step further! Now i get the Error "[247] String too long" after loading neural nets (gnubg) |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12051 |
I think that is because you are running from the A: drive. It is a bug in the program. Run from the B: drive. If you follow Matthias' directions exactly it definitely works Edited 2026-10-24 01:05 by matherp |
||||
| PilotPirx Senior Member Joined: 03/11/2020 Location: GermanyPosts: 164 |
I run from the b: drive (sd-card). It seems to work when I comment out that line. |
||||
| PilotPirx Senior Member Joined: 03/11/2020 Location: GermanyPosts: 164 |
OK, i found it. The program seems to use absolute paths. I had moved the directory one level down. Now it works. Thanks!!! |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12051 |
are you running from a subdirectory or direct from B:/mmbg? |
||||
| PilotPirx Senior Member Joined: 03/11/2020 Location: GermanyPosts: 164 |
At first i was running from a subdirectory b:/games/mmbg which doesn't work. Direct from b:/mmbg and loading with ,C work fine now. |
||||
| homa Guru Joined: 05/11/2021 Location: GermanyPosts: 723 |
I am aware of the problem and it is on my agenda. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |