To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.org.ca.rtltorontoOpen lugnet.org.ca.rtltoronto in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Organizations / Canada / rtlToronto / 9233
9232  |  9234
Subject: 
Re: Connect Four game issues
Newsgroups: 
lugnet.org.ca.rtltoronto
Date: 
Tue, 16 Sep 2003 19:03:21 GMT
Viewed: 
616 times
  
Quoting David Eaton <deaton@intdata.com>:

In lugnet.org.ca.rtltoronto, Iain Hendry wrote:
David Eaton's post exposes my fears.  The logic behind this sounds so • hard.
I don't understand how to program that kind of stuff...  I supose the best • I
could ever hope to do is look at what's been placed, and calculate sort • of
a... hmm. I guess "What's the best move THIS time?" kidna thing.  Look
for "if I drop one here, how many line up?" kinda thing for each of the 7
scenarios and then drop it.  Crud.

To give some reference for plausibility, a look-ahead will reveal (I
think):

Look-ahead  |  Max Possibilities
------------+-------------------
    1       |          7
    2       |         49
    3       |        238
    4       |      1,120
    5       |      4,263
    6       |     16,422
    7       |     54,859
    8       |    184,868
    9       |    821,283

So, you're entirely right. The only way to do this in the RCX world is to
create
an algorithm that analyzes the board and figures out the best move, not
necessarily the move that will guarantee victory N moves down the road.
Unless
there's anyone who's an advanced game theorist who knows that it's possible
to
squeeze in the "perfect" algorithm, I don't think the fact that it's a
"solved"
game will factor into it. (Though I'd be happy to be proven wrong! I've
been
curious about the "perfect" algorithm for a while now)

You might be able to pull off a small look-ahead algorithm in addition,
that
would effectively look, say, 4 moves in advance. That might fit into an RCX
somehow. But I don't think you can get it to the point where you'd look up
42
moves in advance. That's just too big for an RCX to handle. Heck, a
look-ahead
of 9 was soaking up 200+ megs of RAM when I was calculating the above
numbers!
(course you could reduce that by a factor of 4 pretty easily, since I was
doing
1 byte per square, and theoretically you could do 2 bits per square)

Wouldn't you only have to look ahead one step at a time?  The opponent only has
7 choices on any given turn.  It's pretty much impossible to say like playing a
computer in chess, figure out how the game will turn out by the first opening
move.

I think it's hard enough trying to remember all of the current values for each
slot, and the standard rating system you had for the 7x7 isn't quite right,
since if you had 2 in a row, and the next would get you 3 in a row, in a lower
valued slot than a central slot - you would logically place at the 3 in a row
instead - but (if i'm understanding correctly) your design would put it at the
higher valued slot even if it didn't make for 3 in a row?

Should we take this to .geek?



Message is in Reply To:
  Re: Connect Four game issues
 
(...) To give some reference for plausibility, a look-ahead will reveal (I think): Look-ahead | Max Possibilities ---...---+---...--- 1 | 7 2 | 49 3 | 238 4 | 1,120 5 | 4,263 6 | 16,422 7 | 54,859 8 | 184,868 9 | 821,283 So, you're entirely right. (...) (21 years ago, 16-Sep-03, to lugnet.org.ca.rtltoronto)

72 Messages in This Thread:






















Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR