caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: cousinea@dmi.ens.fr
To: Xavier Leroy <xavier@Theory.Stanford.EDU>
Cc: caml-list@margaux
Subject: Re: new library modules
Date: Fri, 7 May 93 12:23:00 +0200	[thread overview]
Message-ID: <9305071023.AA00284@arnica.ens.fr> (raw)



This is an answer to Xavier which asked me to give
examples of preorders on stored objects.


I have recently writen programs for solving puzzles.  By "puzzle"
I mean one-player games in which you start with a given
configuration and try to reach  a configuration that has a given
property.
A puzzle is therefore defined by three values:

start : 'a
possible_moves:  'a -> 'a list
accept:  'a -> bool

Searching for a solution amounts to exploring the connex component
of "start" in the graph defined  by function "possible_moves" and
it usually requires to memorize the configurations in order to avoid
redundant search.
In many puzzles there is a natural equivalence between configurations
(for instance symetries or permutations of equivalent objects). 

Therefore,  it is natural  (and often necessary for efficiency reasons)
to save configurations up to that equivalence. 

Of course, in order to save and retrieve the configurations
efficiently, it is necessary to find an strict order relation
compatible with this equivalence and I must admit that, very often,
this is obtained by first defining a canonical representation for
objects of an equivalent class and then using a total order on the
canonical forms.
However, even in that case, it may be more informative to save the
"real" configurations that have been found and not their canonical
form in order to end with a configuration data base that reflects
the partial spannning tree that has been built to reach a solution.

Therefore, I appreciate having the possibility to use a preorder
rather than an order in the archive mechanism.

  --Guy 







             reply	other threads:[~1993-05-07 13:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-07 10:23 cousinea [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-05-07 10:29 cousinea
1993-05-05  9:53 Damien Doligez
1993-05-04  9:14 cousinea
1993-05-04  9:38 ` Vale'rie Me'nissier-Morain
1993-05-05  2:25 ` Xavier Leroy
1993-05-03 18:45 Xavier Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9305071023.AA00284@arnica.ens.fr \
    --to=cousinea@dmi.ens.fr \
    --cc=caml-list@margaux \
    --cc=xavier@Theory.Stanford.EDU \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).