users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Some strange result


From: Sylvain Julmy
Subject: Some strange result
Date: Thu, 13 Nov 2014 18:37:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

Hi,

at first, excuse me for my English, I'm not very good at...

At the School of Engineering and Architecture of Fribourg, Switzerland,
we have a Prolog course in the thirs year of the Bachelor cursus. In an
exercice, we need to study a programm wo resolve the Hanoi tower problem.

I have create a simple predicat that's simply execute the solve1
predicat (see attachment : hanoi.pl) and the time computation is
increasing and we dont know why.

That's the output when i run my test_solve1 predicat :

| ?- test_solve1(25,10).
 25: nbrMoves = 1023.0   6ms
 24: nbrMoves = 1023.0   9ms
 23: nbrMoves = 1023.0   15ms
 22: nbrMoves = 1023.0   18ms
 21: nbrMoves = 1023.0   22ms
 20: nbrMoves = 1023.0   23ms
 19: nbrMoves = 1023.0   25ms
 18: nbrMoves = 1023.0   25ms
 17: nbrMoves = 1023.0   26ms
 16: nbrMoves = 1023.0   27ms
 15: nbrMoves = 1023.0   31ms
 14: nbrMoves = 1023.0   34ms
 13: nbrMoves = 1023.0   168ms
 12: nbrMoves = 1023.0   204ms
 11: nbrMoves = 1023.0   223ms
 10: nbrMoves = 1023.0   251ms
 9: nbrMoves = 1023.0   270ms
 8: nbrMoves = 1023.0   291ms
 7: nbrMoves = 1023.0   313ms
 6: nbrMoves = 1023.0   334ms
 5: nbrMoves = 1023.0   357ms
 4: nbrMoves = 1023.0   381ms
 3: nbrMoves = 1023.0   399ms
 2: nbrMoves = 1023.0   419ms
 1: nbrMoves = 1023.0   441ms


I hope someone could find a good response to this !

Dear,
Sylvain Julmy
School of Engineering and Architecture of Fribourg
Switzerland

Attachment: hanoi.pl
Description: Perl program


reply via email to

[Prev in Thread] Current Thread [Next in Thread]