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 / 10792
10791  |  10793
Subject: 
Re: C$ - Code Only
Newsgroups: 
lugnet.org.ca.rtltoronto, lugnet.robotics.rcx
Date: 
Fri, 6 Feb 2004 19:56:32 GMT
Viewed: 
1823 times
  
In lugnet.org.ca.rtltoronto, Kevin L. Clague wrote:
For those who don't know, rtlToronto had a contest with robots playing Connect
Four.  Creating a robot for this is double faceted.  Getting robotic hardware to
interface to the connect four board, both scanning to determine where the
opponent dropped the chip, and dropping the chip to complete your turn were very
challenging tasks.


I think most people seriously underestimated how hard building the robot would
be.  The funny thing is, all of rtlToronto's events have the same general
premise:
Build a robot that does something.

Second, if you can make the robot do it well, that's even better.

Finally, if you chose a good strategy (like a great game engine) you may
actually win.


The key is you need to build a robot!



Steve traveled to Toronto and won the contest (so typical :).  I was on a team
with Chris Magno (totalitarian leader LOL!) and Bruce Sheridon.  We made a
vailant effort.  I joined the team at the last minute and created the core game
engine.


This is where I was counting on Chris to pull through for MY team.  I didn't
know Bruce was also working on a robot design that used Kevin's code.  :)



It is a very interesting programming
problem given the constraints of the RCX.

Would this challenge have been as interesting, if the RCX had a faster processor
and 1mb RAM?  I doubt it.

Who really needs an RCX 3.0, anyway?  (no John, I'm not giving back the BFB)



I made a number of algorithmic optimizations to the pomakis code:

1. I eliminated malloc stuff
2.  I eliminated current_state->board
3.  I trimmed down push_state to three lines of code
4.  I changed the map array to be a preinitialized array of unsigned char.
5.  I optimized update_score, and merged it with drop_piece,
6.  I modified calls to evaluate
7.  Optimizing the object code spit out by the compiler is advantageous.

wow.

is..... what level do I calculate the book at.....  Steve, what did you do here?


I stole an opening book off the web.


me to have an opening book with 1700 or more possible board states, getting me
out to the 26th or 27th move.


"my" book has about 400 moves.  Total.  There is only one book, for going first
or second.

Chances are, if your book can get to move 27, you don't need much logic to
finish the game.


I'm just finishing up the librcx version......  Steve, all kidding aside, you
really are very clever, which has driven me to extremes trying to solve this.


Thanks.  I've tried to offer help when people ask.  That really just forces me
to work harder, also.

But you saying that really doesn't mean much, because you said the same thing
about Chris.  :)


All the optimizations you've done sound great, but I think there are actually
some logic flaws with the base code.

From all my testing I've come to the conclusion that playing at level 8 (looking
8 moves ahead, or checking about 5 million possibilities) was not always better
than playing at level 4 (about 2k possibilities).

So, at rtl15, my game engine was playing on level 4, which meant it spent no
visible time thinking about it's move.  Combine that with a pretty fast robot,
and you get an opponent that averages about 10 seconds per move.  (faster than
most people)

I have code that will predict my opponent's move, (create an ordered list of
where he should go) and calculate my response to each possibility.  But
considering I was playing at a pretty low (fast) level, it really wasn't
required.

I think I just realized what's wrong with the original code.  I'll have to look,
tonight, and see if I can fix it...

Steve



Message has 1 Reply:
  Re: C$ - Code Only
 
(...) yes, it was all about the ~game~ within the C$ game. I really wanted to scare you with that bit of info at the last min. (...) you must be SO PROUD of yourself. :) Chris "I stole an opening book off the web." S.H. (20 years ago, 6-Feb-04, to lugnet.org.ca.rtltoronto)

Message is in Reply To:
  Re: C$ - Code Only
 
(...) Folks who read rtlToronto can skip this part. I added it because I'm cross posting to robotics.rcx. For those who don't know, rtlToronto had a contest with robots playing Connect Four. Creating a robot for this is double faceted. Getting (...) (20 years ago, 6-Feb-04, to lugnet.org.ca.rtltoronto, lugnet.robotics.rcx)

28 Messages in This Thread:













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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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