8 queen/game of life

the_wrights the_wrights at onaustralia.com.au
Thu Jun 15 08:47:01 EDT 2000


Peter Immarco <android at micron.net> wrote in message
news:39484ED4.2D3CBCD7 at micron.net...
> Prolog's excellent for this kind [8 queens]of problem too.  (Sorry about
the null-answer on
> doing it in Python. :)
>
> Peter.
>

Someone not experienced in prolog might be seduced by the backtracking, only
to find that the default control structures in the naive implementation of 8
queens led to hopeless inefficiencies.

Prolog is indeed a good language for this type of problem, but those new to
the language should get O'Keefe's book (The Craft of Prolog) and Sterling
and Shapiro (The Art of Prolog) so that the folk lore is available to them.

cheers

chris





More information about the Python-list mailing list