Newsgroups: comp.ai.games
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!news.kei.com!simtel!news1.oakland.edu!vtc.tacom.army.mil!ulowell.uml.edu!wang!news
From: bruck@actcom.co.il (Uri Bruck)
Subject: Re: 'Snake' AI
Organization: ACTCOM - Internet Services in Israel
Date: Sat, 3 Jun 1995 20:21:08 GMT
Message-ID: <D9M5v9.57t@actcom.co.il>
References: <3qiao7$h5n@infa.central.susx.ac.uk> <3qir10$d4n@news.tamu.edu>
Sender: news@wang.com
Lines: 29

Matt Nelsen (min0130@tam2000.tamu.edu) wrote:
: In article <3qiao7$h5n@infa.central.susx.ac.uk>,
: This Sounds a lot like light cycles, which I have been trying to figure out.
: By way of light cycles, I figure that it makes sense to make turns that
: leave you the most room to maneuver, but this is probably just one factor
: to consider.  I would also like to know solutions to this problem.


I wrote a lightcycles program a couple of years oback which wasn't bad

on the defensive moves, although there was still room for improvement.
I can dig up the algorithm if you like. One point I remember clearly was
the preference for taking the oppsite turn of the last one.
Consider that alight cycle has three directions to go:forward,left, right.
It can go forward as long as nothing blocks it, that doesn'yt make for an
 intersting game though, so I added a provision for taking a turn 
at random, very small chance, something like one move in a hundred.
I also recorded the last turn (left or right)
no whenever the cycle was blocked it checked whether the left or right were 
open. If both were open, it took the one it didn't take the last time - 
if lastturn=right then turn left, if lastturn=left then turn right.
if both were open it picked at random, I think your idea of seeing
where there is more room could improve this.
I found that two or three cycles at the computer's disposal, nonn-cooperating
were a pretty good match for me.
I think if one could add some planning and cooperation, like trying to enclose
the player somehow, or at least limiting his space, it could become 
a chalenging game.
Uri
