Jump to content
IGNORED

Royal Game of Ur (old thread)


ramidavis
 Share

Recommended Posts

Used to play it a lot with my brother when we were kids then a couple of years ago I bought a version on Amazon just for nostalgia's sake :)

 

Full game for the TI 99/4A by myself based on the graphics of ramidavis in post #56

Full game for Windows PC by SIO2 in post #46

Full game for the Sharp EL-5500II handheld computer in post #24

 

And for the record, a thread which has been abandoned cannot be hijacked, merely picked up and dusted off :ahoy:

Link to comment
Share on other sites

I had never heard of this game before. It looks interesting.

 

The board strikes me as being remarkably similar to the ancient Egyptian game of Senet.

 

Perhaps you have seen this:

It is a fun watch.

 

The video suggests that there was an alternate set of rules that involved gambling. Since the die look like little pyramids and the Egyptians may have had a similar game... perhaps the explanation everyone has been looking for regarding what purpose the pyramids served is that they were casinos? :)

 

Good luck on your project. I hope someone posts a video of your game when it is done.

Edited by SIO2
  • Like 1
Link to comment
Share on other sites

Here's a simple AI algorithm that should be pretty effective:

 

  1. Throw dice
  2. Can a piece move off the board (needs exact dice number)? If YES, then make move and take piece out of play. Go to 10
  3. Can a piece on the board land on an enemy piece not on a rosette square? if YES, then make move and take out enemy piece. Go to 9
  4. Can a piece on the board or a new piece land on a rosette square free of enemy pieces? If YES, then make move with preference to the piece that can go to the center rosette square. Go to 1
  5. Are there >2 pieces on the board that can move? If YES, then move the furthest one. Go to 9
  6. Are there any unplayed pieces left? If YES then go to 8
  7. Is there a piece on the board that can move? If NO then go to 9
  8. Introduce a new piece into the game.
  9. END computer turn.
  10. Are all the computer pieces off the board? if YES, then computer wins. STOP
  11. Go to 9

You could switch out 3 and 4 if you prefer.

Link to comment
Share on other sites

I am more than happy to help you develop this game. The best way to tackle this would be to break it down into small self-contained steps, generally in the form of subroutines. I am very much a fan of the XB SUB facility, which is very powerful, so make sure you are familiar with it.

For example, you will need a routine to keep track of the location of your pieces and update it as needed. Another routine would be to check if any of your pieces can move, etc... Since a SUB can call other Subs, you can really break down processes very finely and simply call them as needed. SUB allows for parameter passing while being entirely independent from the rest of the program, unlike the standard GOSUB process.

As an example, the movement SUB would first call the dice rolling SUB which would return a number, then the move check SUB would get called to make sure that any of the pieces on the board can move, and so on and so forth... As you develop the game, you'll be creating new Subs as needed.

It's not necessarily an easy process, but it's definitely very doable if you take your time.

How about you start by creating the dice rolling SUB?

  • Like 1
Link to comment
Share on other sites

...The best way to tackle this would be to break it down into small self-contained steps, generally in the form of subroutines. ...which is very powerful...

 

 

And so Forth :-)

 

I couldn't resist. I must confess after watching the video I am intrigued.

  • Like 2
Link to comment
Share on other sites

 

Yup Forth would be an ideal language for this game :) I'm tempted, but I just can't add yet another project to my list! You do it :D

 

I started... but this month will be trouble.

 

The AI component has me interested, but I will get the basics setup first. No pun intended.

Link to comment
Share on other sites

Played the robot. Obviously it's heavily dependent on luck, but there is definitely some strategy to be had here. Taking that center rosette square gives the owner a big advantage. I have amended my AI algorithm accordingly to improve its quality.

 

  1. Throw dice
  2. Can a piece move off the board (needs exact dice number)? If YES, then make move and take piece out of play. Go to 11
  3. Can a piece on the board land on an enemy piece not on a rosette square? if YES, then make move and take out enemy piece. Go to 10
  4. Can a piece on the board or a new piece land on a rosette square free of enemy pieces? If YES, then make move with preference to the piece that can go to the center rosette square. Go to 1
  5. Are there >2 pieces on the board that can move? If YES, then move the furthest one unless it's on the center rosette. Go to 10
  6. Are there any unplayed pieces left? If YES then go to 9
  7. Is there a piece on the board that can move? If NO then go to 10
  8. Move the furthest piece. Go to 10
  9. Introduce a new piece into the game.
  10. END computer turn.
  11. Are all the computer pieces off the board? if YES, then computer wins. STOP
  12. Go to 10
  • Like 2
Link to comment
Share on other sites

I tested the above algorithm in a real game against myself, and I threw the dice for the "computer" and followed the algorithm while I played my own game. The AI won! Again, dice rolls play an important role, but I believe the AI strategy is pretty sound here :) Once again simple rules can generate apparent complexity in thinking...

  • Like 1
Link to comment
Share on other sites

I tested the above algorithm in a real game against myself, and I threw the dice for the "computer" and followed the algorithm while I played my own game. The AI won! Again, dice rolls play an important role, but I believe the AI strategy is pretty sound here :) Once again simple rules can generate apparent complexity in thinking...

Interesting.

 

And yes the simple rules observation is supported by most human activity in the world. :-D

  • Like 1
Link to comment
Share on other sites

So I just had to write a little program to test my AI algorithm fully :D However, I did it using a Sharp EL-5500II handheld scientific computer and a few sheets of paper while waiting for my car to be serviced. That computer is from the early 80's and is great for minor computing on the go. Here's a video of a game I played against it:

https://youtu.be/S79hGlVofXQ

 

While I did end up winning, it really was not by much and if the computer had slightly better dice rolls it could have easily bested me. In the video at around 26:00, I take a piece from the wrong stack, and although it has no bearing on the outcome, the final result is 6 for the computer, not 5 as shown, and 7 for me, off by just one!

 

The BASIC code is super generic and will work on virtually any vintage computer with BASIC save the random generation function which syntax can vary. It would be eminently portable to the CC40 for example. The debugging using a 24 character single line screen was masochistic at best, but also very nostalgic. Go figure... Unfortunately, I don't have a neatly formatted listing to give you since all I have is 4 sheets of dense and heavily redacted paper, but I can post pictures of them if any brave soul wants them :)

 

Now I can finally take this game out of my mind :grin:

  • Like 2
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...