Boray Gammon (Now V2.0)
Moderator: Moderators
Re: Boray Gammon
Thanks! Yes, it's basic compiled with austro compiler. I started to program on a real Vic-20 with that in mind, but after a while I went over to using Basedit.Net and VICE instead. The program got a bit too complex for the small screen of the Vic I think, and using VICE I could test the program in normal basic running at 600% speed and often even at 3200%. I often made small changes to the algorithm only affecting one of black or white and then run the emulator at warp speed to see if the change made it win more.
austro compiled programs seems to use the normal basic engine for variables, because you can break the program and then for example type print a$ to see that value. That's actually pretty useful during testing.
austro compiled programs seems to use the normal basic engine for variables, because you can break the program and then for example type print a$ to see that value. That's actually pretty useful during testing.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Re: Boray Gammon
Here comes a bunch of development pictures for you:
http://museum.boray.se/#!album-10
http://museum.boray.se/#!album-10
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Re: Boray Gammon
Boray Gammon vs one of the top gammon AIs in the world
GNU Gammon is ranked as the number two top gammon artificial intelligence in the world today (beaten by Extreme gammon, mostly in speed). GNU gammon also has the ability to analyse the game and rank the player. So how does it rank Boray Gammon? Well, judge for yourself. This is the first test game I've run with Boray Gammon V1.15:
Only two moves marked as "doubtful" by gnu. No bad ones. No "very bad" ones. And here is the whole game noted:
GNU Gammon is ranked as the number two top gammon artificial intelligence in the world today (beaten by Extreme gammon, mostly in speed). GNU gammon also has the ability to analyse the game and rank the player. So how does it rank Boray Gammon? Well, judge for yourself. This is the first test game I've run with Boray Gammon V1.15:
Only two moves marked as "doubtful" by gnu. No bad ones. No "very bad" ones. And here is the whole game noted:
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Re: Boray Gammon
That's a very nice and respectable ranking, I'm sure you're proud of your "baby"
Re: Boray Gammon
Yeah, especially considering GNU grandmaster uses about the same amount of thinking time on a computer that is 50.000 times faster.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
- orion70
- VICtalian
- Posts: 4337
- Joined: Thu Feb 02, 2006 4:45 am
- Location: Piacenza, Italy
- Occupation: Biologist
Re: Boray Gammon
Sooo... size does NOT matter, as long as you use it wisely
Re: Boray Gammon
V1.21 is released:
Faster: The AI is about twice as fast. The average thinking time is now around 5 seconds instead of 10 seconds.
Smarter: The AI wins about 20% more points when playing against the previous version (in the long run). This version has actually won a 7 point match over me (with the score 7-5). I'm not sure if I should be proud or embarrased.
Faster: The AI is about twice as fast. The average thinking time is now around 5 seconds instead of 10 seconds.
Smarter: The AI wins about 20% more points when playing against the previous version (in the long run). This version has actually won a 7 point match over me (with the score 7-5). I'm not sure if I should be proud or embarrased.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Re: Boray Gammon
Well since you programmed the AI either way you look at it, you won...... or lost.
Sent from my Nexus 5 using Tapatalk
Sent from my Nexus 5 using Tapatalk
Re: Boray Gammon
I just learned to play backgammon, but it's still not easy to play the VIC-20 version because of the keyboard controls.
Would it be possible to make a version with a movable "cursor" and/or show the legal moves?
I'm also curious about the AI you programmed, can your share some detail? Having written a gomoku implementation, I know how much difficult is to pack an AI into VIC's memory. Is it heuristic?
Would it be possible to make a version with a movable "cursor" and/or show the legal moves?
I'm also curious about the AI you programmed, can your share some detail? Having written a gomoku implementation, I know how much difficult is to pack an AI into VIC's memory. Is it heuristic?
Re: Boray Gammon
I will keep the keyboard control. I think using a cursor just will slow you down.
I guess you can say it's heuristic. I would think all backgammon AIs are. With all randomness built into the game, no computer would be enough to calculate all possible moves of the rest of the game.
What I'm doing is to test all possible moves given by the two dice and give each of the moves a score for things that are better and worse. Well, the score is actually a score for how much the board has improved in your favor compared to before the move. So in many cases it's a negative score but still the best possible (according to the routine at least). And in addition to that I also have a few routines that takes over in different situations. You can actually see which routine (with a code name) and the score while the computer is moving (below the board). Doubles are treated as two separate moves after each other, which probably is the weakest link in my AI. But most of the time, it works well enough.
A new version will be released quite soon by the way...
I guess you can say it's heuristic. I would think all backgammon AIs are. With all randomness built into the game, no computer would be enough to calculate all possible moves of the rest of the game.
What I'm doing is to test all possible moves given by the two dice and give each of the moves a score for things that are better and worse. Well, the score is actually a score for how much the board has improved in your favor compared to before the move. So in many cases it's a negative score but still the best possible (according to the routine at least). And in addition to that I also have a few routines that takes over in different situations. You can actually see which routine (with a code name) and the score while the computer is moving (below the board). Doubles are treated as two separate moves after each other, which probably is the weakest link in my AI. But most of the time, it works well enough.
A new version will be released quite soon by the way...
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Re: Boray Gammon
ok, so you have a manually encoded "value" function for every legal move.
The difference with the famous TDGammon is that the value function is calculated by a neural network as the result of playing a lot of matches against itself.
I wonder if it would be possible to write a cut down version of a such neural network that can fit on the VIC. Or at least optimize the parameters of the actual function so that it can play as good as possible.
TD-Gammon also plays many turns in advance, so it doesn't take the move with the best score, but the move that can lead to a best score in the future.
The difference with the famous TDGammon is that the value function is calculated by a neural network as the result of playing a lot of matches against itself.
I wonder if it would be possible to write a cut down version of a such neural network that can fit on the VIC. Or at least optimize the parameters of the actual function so that it can play as good as possible.
TD-Gammon also plays many turns in advance, so it doesn't take the move with the best score, but the move that can lead to a best score in the future.
Re: Boray Gammon
Interesting. I've let my program play a lot of games against itself as well (in VICE at warp speed). In the version soon to be released, I've changed 7 of the opening moves. Right now the new version is in the lead with 1294 points against 1092 for the old version. So that's an 18% improvement.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Re: Boray Gammon
Is source code available? I would like to give a peek at it. I like the idea of making the best possible player that fits on a VIC-20
Re: Boray Gammon
Well, I don't know, I'm a bit closed when it comes to source code.... Hmmm... So you're interested in making your own backgammon game?
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Re: Boray Gammon
no, I don't want to make my own implementation of backgammon, I've learned how to play just yesterday!
But since I've heard a lot about TD-Gammon (in the field of machine learning), it raised my interested about the possibility of implementing a cut down version of it on the VIC.
But I guess there isn't just enough computing power, both memory and FLOPS.
But since I've heard a lot about TD-Gammon (in the field of machine learning), it raised my interested about the possibility of implementing a cut down version of it on the VIC.
But I guess there isn't just enough computing power, both memory and FLOPS.