Nп/п : 81 из 87
 От   : Mild Shock                          2:5075/128        27 сен 23 05:36:33
 К    : Mild Shock                                            27 сен 23 15:39:03
 Тема : Re: The road to Artificial Intelligence
----------------------------------------------------------------------------------
                                                                                 
@MSGID:
<c098af25-c4e0-4bec-9978-15bc77c1e35an@googlegroups.com> e9a39164
@REPLY:
<0affa1a9-0d0c-48e0-ab27-88bdec79325bn@googlegroups.com> d3b56140
@REPLYADDR Mild Shock <bursejan@gmail.com>
@REPLYTO 2:5075/128 Mild Shock
@CHRS: CP866 2
@RFC: 1 0
@RFC-References:
<b406aa35-c39b-46f3-862f-1cc4b75143ae@googlegroups.com> <19d4cdc3-378d-4b2c-b950-f819b08eb6c1n@googlegroups.com>
<0affa1a9-0d0c-48e0-ab27-88bdec79325bn@googlegroups.com>
@RFC-Message-ID:
<c098af25-c4e0-4bec-9978-15bc77c1e35an@googlegroups.com>
@TZUTC: -0700
@PID: G2/1.0
@TID: FIDOGATE-5.12-ge4e8b94
Unfortunately I find nowhere the full source of this new
GHC Prolog by tadashi9e, which makes it a little dubious. 
Then Dogelog Player yet generates another number:

tarai(X, Y, _, R) :- X =< Y, !, R = Y.
tarai(X, Y, Z, R) :- X_1 is X-1, tarai(X_1, Y, Z, R_X),
   Y_1 is Y-1, tarai(Y_1, Z, X, R_Y),
   Z_1 is Z-1, tarai(Z_1, X, Y, R_Z),
   tarai(R_X, R_Y, R_Z, R).

 ?- statistics(calls, A), shield(tarai(12, 11, 0, _)), statistics(calls,
B), C is B-A.
A = 115190487, B = 230328953, C = 115138466.

?- statistics(calls, A), tarai(12, 11, 0, _), statistics(calls, B), C is B-A.
A = 46911, B = 115187678, C = 115140767.

shield/1 does switch off auto-yield. Expectation was rather
that the second query gives 115138466 again, minus a few
inferences since shield/1 wasn`t called. But it seems that 

auto-yield leads to some phantom inferences which should 
not be the case. So I guess we have a glitch somehere in the
bookkeeping. But why is GHC Prolog count higher? Maybe 

because it has some constructs like (->)/2 in the second clause
of tarai. Also both clauses in GHC need (|)/2, and the second 
clause has a true/0 guard. This could explain the higher count?

Mild Shock schrieb am Mittwoch, 27. September 2023 um 13:06:01 UTC+2:
> Don`t do the LIPS. 

> /* SWI-Prolog 9.1.16 */ 
> ?- time(tarai(12, 11, 0, X)). 
> % 54,182,800 inferences, 2.625 CPU in 2.616 seconds (100% CPU, 20641067 Lips) 
> X = 12. 

> /* Guarded Horn Clauses */ 
> $ ./tarai 12 11 0 
> % 196412655 inferences, 3.34256 CPU seconds (58761215.967661 Lips) 
> 12 

> tadashi9e, 2023 
https://qiita.com/tadashi9e/items/45cef62cda6d38dda0c7 

> Sanity No More - Only Chaos Here
> Mild Shock schrieb am Samstag, 23. September 2023 um 22:51:13 UTC+2: 
> > Now its clear, the Corona vaccine has had a side effect, 
> > everbody got Alzheimer over the last months. The 
> > SWI-Prolog discourse is a typical example, it has become 
> > 
> > a retirement home for some self-talking veterans. 
> > Thomas Alva Edison schrieb am Dienstag, 10. Juli 2018 um 15:28:05 UTC+2: 
> > > Prolog Class Signpost - American Style 2018 
> > > https://www.youtube.com/watch?v=CxQKltWI0NA
--- G2/1.0
 * Origin: usenet.network (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх