Morpion solitaire/Unicon: Difference between revisions

word smithing
m (text)
(word smithing)
Line 1:
This example goes beyond the task goal of playing a random game of Morpion solitaire. The program was designed as a first cut/test bed more for understanding and explore the problem space rather than for high efficiency. The program is structured to allow its behaviour to be configured (see options and M_ vars). Some of the features and extensions include:
Using random play in many summary runs, the highest score achieved was 90. While it was fairly easy to push random games into the low 80's running simulations of as little as a few hundred games, going beyond the highest score without adding some smarts will require some very long runs and is unlikely to result in any significant progress.
* PlayPlaying a single games or runrunning multigame simulations to find and capture the best games
* Read/writeProducing are-loadable game recordrecords and the ability to replay a saved game to the end or tofrom a specificgiven moveposition forward
* The ability to reproduce purely random games from the random number seed
* LimitLimiting the initial random moves to 1 of 4 cases (inside corners, outside corners (2 types), outside valley) not 1 of 28
* Plugable modules for functions including applying player strategy, position evaluation (fitness/heuristics)to facilitate quick experimentation
 
Using random play in many summary runs, the highest score achieved was 90. While it was fairly easy to push random games into the low 80's running simulations of as little as a few hundred games, going beyond the highest score without adding some smarts will require some very long runs and is unlikely to result in any significant progress. Observing multigame runs show that play advances fairly quickly before a progress grinds to a virtual halt. Many runs peak in the first few hundred or thousand games.
The ability to replay recorded games provides a way to study the behaviour of the problem. Selecting successful random games, truncating them and running multigame simulations using a successful base shows that the seeds of success are sown early. It was possible to better good random game scores (mid 80s) pushing the new scores up into the mid 90s. Unfortunately this technique when applied to Chris Rosin's record game did not produce any new records. However, it was possible to produce games in the high 160's! using random play with a truncated (60%) version of the record game.
 
The ability to replay recorded games provides a way to study the behaviour of the problem. Selecting successful random games, truncating them and running multigame simulations using a successful base shows that the seeds of success are sown early. It was possible to better good random game scores (mid 80s) pushing the new scores up into the mid 90s. Unfortunately this technique when applied to Chris Rosin's 177 move record game did not produce any new records :(. HoweverSurprisingly however, it was possible to produce games in the high 160's! using random play with a truncated (60%) version of the recordthis game.
The program is structured to allow its behaviour to be configured (see M_ vars) to do multi-game simulations and try out strategies. It was a first cut/test bed designed more to understand and explore the problem space rather than for high efficiency.
 
The observation that a game becomes bad or good fairly early suggests that finding an intelligent forward looking position fitness evaluator is going to be a challenge to say the least.
The grid is automatically expanded as needed whenever a cell is played on an outer edge. When this happens only the affected side is expanded. As a side effect the grid numbering will seem unusual. The game log shows all row/col coordinates relative to the 1,1 origin located at the intersection of the lines containing top and left most edges of the cross.
 
It's also possible to capture bad games. This might provide some kind of comparison against good games when considering fitness evaluators. Or not.
Extensions/features include:
 
* Play single games or run multigame simulations to find and capture the best games
TheInternally, the grid is automatically expanded as needed whenever a cell is played on an outer edge. When this happens only the affected side is expanded. As a side effect the grid numbering will seem unusual. The game log shows all row/col coordinates relative to the 1,1 origin located at the intersection of the lines containing top and left most edges of the cross. A fixed grid might be more efficient. With the ability to detect an off page condition and save and replay the game later this could be easier to deal with. The issue of grid origin comes up all the time when working with the code.
* Read/write a game record and ability to replay a saved game to the end or to a specific move
* Use a plugable scoring/evaluation procedure at each move (for heuristics)
* Limit initial random moves to 1 of 4 cases (inside corners, outside corners (2 types), outside valley) not 1 of 28
 
For an example of a loadable and re-playable game see [[Morpion_solitaire/Rosin177|Chris Rosin's 177 move 5T previous record holder]].
 
For more see: Morpion -h|-help
 
Observations:
* Random play suggests that things are advance fairly quickly before a position gets choked. Many runs hit their mark in the first 5-10k. A few require more (e.g 50K).
 
 
== Core Morpion Routines ==
Anonymous user