[gecode-users] A problem for restart

Zhu Zichen's cse zzhu at cse.cuhk.edu.hk
Thu Jan 8 15:22:03 CET 2015


Dear Christian,

Got it. Thanks.


Zoe

On Thu, Jan 8, 2015 at 10:05 PM, Christian Schulte <cschulte at kth.se> wrote:

> Hi Zoe,
>
>
>
> I just fixed the bug in the trunk: now no-goods are extracted properly
> even for solutions. The problem was that the last leaf was missing in a
> no-good for a solution and in order to get that one, the search engines
> needed to be changed so that when they are stopped in for a restart, the
> path used for no-good extraction will really point to the next node in the
> tree...
>
>
>
> Expect a release pretty soon
>
>
>
> Best
>
> Christian
>
>
>
> --
>
> Christian Schulte, Professor of Computer Science, KTH,
> www.gecode.org/~schulte/
>
>
>
> *From:* zichenzu at gmail.com [mailto:zichenzu at gmail.com] *On Behalf Of *Zhu
> Zichen's cse
> *Sent:* Tuesday, December 16, 2014 4:14 PM
> *To:* cschulte at kth.se
> *Cc:* users at gecode.org
> *Subject:* Re: [gecode-users] A problem for restart
>
>
>
> Dear Christian,
>
>
>
>      Here are the codes. Many thanks.
>
>
>
> Zichen
>
>
>
> On Tue, Dec 16, 2014 at 11:04 PM, Christian Schulte <cschulte at kth.se>
> wrote:
>
> Hi Zichen,
>
>
>
> MPG does not make a promise here: it says "the solution might not be found
> again" but it does not give you a guarantee. But for your example I would
> have to know how nqueen_rbs looks like.
>
>
>
> Cheers
>
> Christian
>
>
>
> --
>
> Christian Schulte, Professor of Computer Science, KTH,
> www.gecode.org/~schulte/
>
>
>
> *From:* users-bounces at gecode.org [mailto:users-bounces at gecode.org] *On
> Behalf Of *Zhu Zichen's cse
> *Sent:* Tuesday, December 16, 2014 3:43 PM
> *To:* users at gecode.org
> *Subject:* [gecode-users] A problem for restart
>
>
>
> Dear all,
>
>
>
> I met a problem when using ​restart in Gecode.
>
>
>
> I simply use restart to find all solutions for 4-Queens while use the same
> heuristic after each restart:
>
> ./nqueen_rbs -restart geometric -restart-scale 2 -restart-base 10 -nogoods
> 1 -nogoods-limit 128 4
>
>
>
> But I got into an infinite loop which keeps printing the first solution.
>
>
>
> According to the newest version of document "MPG" (page 160), the master()
> function posts no-goods when the a solution is found. This means the same
> solution will not be found again.
>
>
>
> I rewrite the master() function by changing the last line "return true"
> into "return false", now all solutions are generated without trapped into a
> loop.
>
>
>
> I am wondering why the infinite loop happens and whether Gecode has truly
> recorded previous solutions as nogoods as the document says.
>
>
>
> Thanks for help.
>
>
>
> Zichen
>
> [image: Image removed by sender.]
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20150108/588dfafc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 823 bytes
Desc: not available
URL: <http://www.gecode.org/pipermail/users/attachments/20150108/588dfafc/attachment-0001.jpg>


More information about the users mailing list