POV-Ray : Newsgroups : povray.binaries.animations : game Server Time
19 Jul 2024 06:20:19 EDT (-0400)
  game (Message 31 to 32 of 32)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Andrew Wilcox
Subject: Re: game
Date: 19 Mar 2004 13:27:41
Message: <405b3b9d$1@news.povray.org>
So what's the secret?

AW


Post a reply to this message

From: Apache
Subject: Re: game
Date: 19 Mar 2004 16:47:21
Message: <405b6a69@news.povray.org>
1.
Avoid depth-first search, go width-first.

2.
Keep track of every position encountered.
Every position has a pointer to the previous position in the game. (That
position also has it's own previous position etc etc). If the position has
been encountered before, ignore it and don't save it, because when the
program "met" it before, it had done less moves/steps to reach it.

3.
When a single step makes the game situation flip-invertable, you're halfway
and the rest of the game is like the beginning but than flipped-inverted
going backward.

4.
Throw away step sequences that are *absolutely* unnecessary. This is the
trickiest part  :-P


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.