Just another Perl shrine PerlMonks

### comment on

 Need Help??

Recently I was reading through a thread referring to games, and it reminded me of the story I had read about the gentleman whom invented the Connect Four gaming machine.

It seems that when he tried to solve the game going forwards, playing move by move, and attempting to compute all possible moves, it became a staggering task which defied computational resources available to gaming machines. This sprung to mind reading tilly's comment regarding doing something similar with Go or Othello:

Be warned. While you might build a prototype in Perl, you will not have any possibility of succeeding in your eventual goal without rewriting in a different language. Perl is just too wasteful on memory to be great at this task.

I quite agree.

So... Keeping that in mind, the resolution to the connect four problem was reached by computing the problem backwards.

What I was considering was to start with computing the factorial variations which define the set of winning board states. This would consist, for example of greater than 50% of the board consisting of a single color when completely filled. This limits the computational space so that every potential state need not be explored.

Work backwards from these to define potential paths to attain them. This is a one time operation which will require vast amounts of storage and a long time to run. (This is where it gets fun...or completely breaks down)

The results are then subject to statistical analysis, which is once again a one-time operation.

By thereafter resolving which board-states are most common and which paths are shortest to a winning resolution you create a string of potential board state targets to try to attain at every move. In this case a move is defined as a search space related to the number of empty spaces left on the board.

My limited understanding of this subject leads me to believe that this would lead to more of a pattern matching problem added to playing the game.

This has something to do with human thinking also, since our brains are better at pattern recognition than repetitious computation.

The question then becomes how to filter out the 'line noise' of the competetor, whom will naturally not take the optimal path for his/her competetor to win. That is where I see the traditional min-max tree approach taking hold to try to return the state of the board to one which leads to a winning combination.

Something to play with anyway...

Wait! This isn't a Parachute, this is a Backpack!

In reply to Looking backwards to GO forwards by gregor42

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

• Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
• Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
• Read Where should I post X? if you're not absolutely sure you're posting in the right place.
• Posts may use any of the Perl Monks Approved HTML tags:
a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
• You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
 For: Use: & & < < > > [ [ ] ]
• Link using PerlMonks shortcuts! What shortcuts can I use for linking?

Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2021-01-20 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
The STEM quote I most wish I'd made is:

Results (215 votes). Check out past polls.

Notices?