The Hotness
Games|People|Company
Dominion: Dark Ages
Fantastiqa
Mage Knight: Board Game
Total War
Descent: Journeys in the Dark (Second Edition)
Eclipse
Mice and Mystics
Dungeon Fighter
Collapsible D: The Final Minutes of the Titanic
Lords of Waterdeep
Agricola: All Creatures Big and Small
Libertalia
Android: Netrunner
Virgin Queen
The Lord of the Rings: Nazgul
A Game of Thrones: The Board Game (Second Edition)
Dominion
Star Wars: X-Wing Miniatures Game
Infiltration
The Lord of the Rings: The Card Game
Among the Stars
Twilight Struggle
The Swarm
Agricola
1989: Dawn of Freedom
Goa
7 Wonders
Glory to Rome
Arkham Horror
Village
Ora et Labora
Battles of Westeros: House Baratheon Army Expansion
Through the Ages: A Story of Civilization
Thunder Road
Trajan
Zombicide
The Castles of Burgundy
7 Wonders: Cities
Ace of Spies
War of the Ring
Skyline
Space Alert
Sherlock Holmes Consulting Detective
City of Horror
Race for the Galaxy
Dungeon Command: Sting of Lolth
Twilight Imperium (third edition)
Kingdom Builder
Le Havre
Battlestar Galactica
Recommend
16 
 Thumb up
 Thumb up
10 Posts

Ricochet Robots» Forums » General

Subject: Ricochet Robots is strongly solved rss

Your Tags: Add tags
Popular Tags: [View All]
Wee-Chong Oon
Singapore
Toa Payoh
Unspecified
...Well, almost. We should finish computing all possible board configurations in about 5 days. This means that we will have found a solution with the minimum number of moves for all possible Ricochet Robots (3rd edition) starting positions.

The solution technique is pretty straightforward: we just bought a lot of RAM and did a complete retrograde analysis for each board. The final database is going to have over 10 trillion (10^13) positions. Just a few years ago, this would have required special hardware or a supercomputer, but now we can do it on a standard PC. The amount of power that's in the hands of us mere mortals these days is amazing.

So far, all positions we've checked have a solution, and the hardest position (in terms of the number of moves) we've found takes 25 moves. We also verified that the 24-move solution posted on the thread http://www.boardgamegeek.com/thread/308557/hardest-ricochet-... is optimal.

The version we're close to solving uses the most basic rules: no silver robot, and the active robot does not need to ricochet. We're also computing a solution to the version where the active robot must ricochet at least once, but that one will take a bit longer to compute.

We're going to write a short paper on this and send it to the ICGA journal. Any comments and suggestions are welcome.

Incidentally, in my opinion, this work in no way makes Ricochet Robots any less fun as an over-the-board game. After all, millions of people play Sudoku even though it can be solved instantaneously with basic constraint programming.
8 
 Thumb up
0.01
 tip
 Thumb up
Russ Williams
Poland
Wrocław
Dolny Śląsk
Avatar
mbmbmb
UmExcuseMe wrote:
...Well, almost. We should finish computing all possible board configurations in about 5 days.

Er, so how many days will the entire computation have lasted (assuming it indeed finishes in 5 days)?

Quote:
The final database is going to have over 10 trillion (10^13) positions.

A lot indeed!

Out of curiosity, I want to compute it:

3! * 4^4 = 1536 board configurations (factoring out the 4 board rotations by supposing one specific board is always in the upper left)

times

256^4 = 4 294 967 296 initial robot configurations

times

17 possible goals

= 1.12150186 × 10^14 positions

Hmm, I get higher than you by a factor of 10. Am I overcounting somewhere? Or do you factor out a factor of 6 to not bother distinguishing colors of the 3 robots whose color is not that of the goal?
1 
 Thumb up
 tip
 Thumb up
Wee-Chong Oon
Singapore
Toa Payoh
Unspecified
russ wrote:

Er, so how many days will the entire computation have lasted (assuming it indeed finishes in 5 days)?


It takes about 4-5 hours a board. With 96 boards, the whole computation takes about 20 days. Right now, we're running the computation on 3 separate threads on a multi-core machine.

Actually, we were running it for a couple of weeks on a single machine before we found a silly bug in our code (we didn't write the results of the final iteration onto the disk - d'oh!), so we've got partial results to 60+ positions. Just fixed the bug and started re-running everything yesterday.

Quote:
The final database is going to have over 10 trillion (10^13) positions.
A lot indeed! :)

Out of curiosity, I want to compute it:

3! * 4^4 = 1536 board configurations (factoring out the 4 board rotations by supposing one specific board is always in the upper left)


This should be 3! * 2^4 = 96. There are only 2 sides to every board piece.

Quote:
times

256^4 = 4 294 967 296 initial robot configurations


Slightly overstated. There are only 252 * 251 * 250 * 249 robot configurations (the 4 central squares are blocked).

Quote:
Or do you factor out a factor of 6 to not bother distinguishing colors of the 3 robots whose color is not that of the goal?


Yes, we factor out the colors of the non-active robots. Assuming we didn't make a mistake in our calculations, the number of positions should be 10,237,336,200,000. (Don't forget that all the robot colors are irrelevant for cosmic vortex positions)
3 
 Thumb up
 tip
 Thumb up
Russ Williams
Poland
Wrocław
Dolny Śląsk
Avatar
mbmbmb
UmExcuseMe wrote:
This should be 3! * 2^4 = 96. There are only 2 sides to every board piece.

Ah yes; I was bogusly thinking of rotating each board section (1 of 4 rotations), forgetting that in fact they have fixed orientation due to the center fastener, and that they are double-sided boards. This is a sign that it's been too long since I've played this game.
1 
 Thumb up
 tip
 Thumb up
Timothy Hunt
United States
St Louis
Missouri
flag msg tools
Avatar
mbmbmbmbmb
what about adding the optional silver robot?
1 
 Thumb up
 tip
 Thumb up
Toco
Belgium

Vlaanderen
flag msg tools
designer
Avatar
mbmbmbmbmb
Did you try to solve other board games with this technique?
 
 Thumb up
 tip
 Thumb up
Wee-Chong Oon
Singapore
Toa Payoh
Unspecified
Timotheous wrote:
what about adding the optional silver robot?


That would multiply the number of game states by about 60 times, which would require more RAM than you could get on a standard PC. There may be some tricks that we could do to handle the problem (parallel programming comes to mind), but right now it seems to be just out of reach for us. In academic papers, this would be classified under "future work".
4 
 Thumb up
 tip
 Thumb up
Wee-Chong Oon
Singapore
Toa Payoh
Unspecified
tocoking wrote:
Did you try to solve other board games with this technique?


Retrograde analysis is a standard technique for solving board games. Awari is another game that was strongly solved with retrograde analysis, and also many chess endgames.
 
 Thumb up
 tip
 Thumb up
Wee-Chong Oon
Singapore
Toa Payoh
Unspecified
UmExcuseMe wrote:
The final database is going to have over 10 trillion (10^13) positions.


Oops. Turns out I added an extra zero to my calculations. The database only has 1,023,733,620,000 positions, which is about one trillion (10^12). :blush:
1 
 Thumb up
 tip
 Thumb up
Michael Henke
Germany

UmExcuseMe wrote:
Oops. Turns out I added an extra zero to my calculations. The database only has 1,023,733,620,000 positions, which is about one trillion (10^12). blush

Did your program find just one or all optimal solutions per board configuration?

How many terabytes is your database?
What will it be used for?
 
 Thumb up
 tip
 Thumb up
Front Page | Welcome | Contact | Privacy Policy | Terms of Service | Advertise | Support BGG | Feeds RSS
Geekdo, BoardGameGeek, the Geekdo logo, and the BoardGameGeek logo are trademarks of BoardGameGeek, LLC.