Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!orc!bbn.com!nic!bunny!tomf From: tomf@GTE.COM (Tom Fawcett) Newsgroups: comp.lang.prolog Subject: Re: Arrays in Prolog Message-ID: <9680@bunny.GTE.COM> Date: 4 Sep 90 19:55:36 GMT References: <3629@goanna.cs.rmit.oz.au> <9668@bunny.GTE.COM> Organization: GTE Laboratories, Waltham MA Lines: 31 alberto@cs.umd.edu (Jose Alberto Fernandez R) writes: > > [Long message suggesting a way to represent a board sequence > without using arrays] > Thanks for the suggestion. There are a few problems with it (the code in #3 is wrong, but I get the idea), but the biggest problem is that this doesn't really address what I'm trying to do. I'm not simply trying to represent a sequence of boards, each of which is a minor modification of another. I'm doing a search through successor boards, trying to find the best next move (like a minimax search, but not really). I may end up having to search several ply. In this case, your scheme doesn't work because the boards aren't in a linear sequence. I really do need something like independent board IDs to represent alternate moves at each level, and it seems like the most efficient way to implement these is with arrays. (Indidentally, I'm told that assert is fairly expensive, so even if I can avoid retracting facts that are no longer true, it doesn't buy me that much.) >:/ \ Jose Alberto Fernandez R | INTERNET: alberto@cs.umd.edu >:| o o | Dept. of Computer Sc. | BITNET: alberto@cs.umd.edu >:| ^ | University of Maryland | UUCP: {...}!mimsy!alberto >:\ \_/ / College Park, MD 20742 | -- -Tom Fawcett GTE Labs, and UMass/Amherst