Skip to content

NAL 8: Operations and Goals as Events

PtrMan edited this page Jul 5, 2020 · 9 revisions

specification NAL-8


//The goal is to make t001 opened.

<{t001} --> [opened]>!

//If the robot hold t002, then go to t001 and open t001, then t001 will be opened.

<(&/,<(*,SELF,{t002}) --> hold>,<(*,SELF,{t001}) --> at>,<(*,{t001}) --> ^open>) =/> <{t001} --> [opened]>>.

20

//outputMustContain('(&/,<(*,SELF,{t002}) --> hold>,<(*,SELF,{t001}) --> at>,(^open,{t001}))! %1.00;0.81%')


//The goal is to hold t002, then arrive t001 and open t001

(&/,<(*,SELF,{t002}) --> hold>,<(*,SELF,{t001}) --> at>,(^open,{t001}))!

10

//The goal is to hold t002

//outputMustContain('<(*,SELF,{t002}) --> hold>! %1.00;0.81%')


//The goal for the robot is to make t002 reachable and then pick it.

(&/,<(*,SELF,{t002}) --> reachable>,(^pick,{t002}))!

5

//The goal for the robot is to make t002 reachable.

//outputMustContain('<(*,SELF,{t002}) --> reachable>! %1.00;0.81%')


//The goal for the robot is to make t002 reachable.

<(*,SELF,{t002}) --> reachable>!

//If item 1 is on item 2 and the robot is also at item 2 at the same time, the robot will be able to reach item 1.

<(&|,<(*,,#2) --> on>,<(*,SELF,#2) --> at>)=|><(*,SELF,) --> reachable>>.

10

//The goal is to make the robot at #1 and t002 is on #1 at the same time

//outputMustContain('(&|,<(*,SELF,#1) --> at>,<(*,{t002},#1) --> on>)! %1.00;0.81%')


//t002 is on t003 now.

<(*,{t002},{t003}) --> on>. :|:

//The goal is to make t002 on #1 and #1 is at the robot at same time

(&|,<(*,{t002},#1) --> on>,<(*,#1,SELF) --> at>)!

350

//The goal maybe to make t003 at the robot

//outputMustContain('<(*,{t003},SELF) --> at>! %1.00;0.43%')


//The goal for the robot is to arrive t003.

<(*,SELF,{t003}) --> at>!

//If go to somewhere, the robot will be at there.

<(^go-to,)=/><(*,SELF,) --> at>>.

100

//The goal is to go to t003.

//outputMustContain('(^go-to,{t003})! %1.00;0.81%')


//Now the robot is going to t003.

<(*,{t003}) --> ^go-to>. :|:

//If go to somewhere, the robor will be at there.

<<(*,) --> ^go-to> =/> <(*,SELF,) --> at>>.

20

//The robot will be at t003.

//outputMustContain('<(*,SELF,{t003}) --> at>. :!5: %1.00;0.81%')


//The robot was at t003.

<SELF --> (/,at,_,{t003})>. :\:

6

//The robot was at t003.

//outputMustContain('<{t003} --> (/,at,SELF,_)>. :!-5: %1.00;0.90%')


//t002 is on t003 now.

<(*,{t002},{t003}) --> on>. :|:

6

//t002 is on t003 now.

//outputMustContain('<{t003} --> (/,on,{t002},_)>. :!0: %1.00;0.90%')


//The robot was at t003.

<{t003} --> (/,at,SELF,_)>. :\:

//t002 was on the t003.

<{t003} --> (/,on,{t002},_)>. :\:

33

//If the robot was at something, t002 was also on it.

//outputMustContain('(&&,<#1 --> (/,at,SELF,_)>,<#1 --> (/,on,{t002},_)>). :!-5: %1.00;0.81%')


//t002 was on something and the robot was also at it at the same time.

(&|,<#1 --> (/,on,{t002},_)>,<#1 --> (/,at,SELF,_)>). :\:

8

//t002 was on something and the robot was also at it at the same time.

//outputMustContain('(&|,<#1 --> (/,on,{t002},_)>,<(*,SELF,#1) --> at>). :!-5: %1.00;0.90%')


//t002 is on something, and the robot is also at it at the same time.

(&|,<(*,{t002},#1) --> on>,<(*,SELF,#1) --> at>). :|:

//If item 1 is on item 2 and the robot is also at item 2 at the same time, the robot will be able to reach item 1.

<(&|,<(*,,) --> on>,<(*,SELF,) --> at>) =|> <(*,SELF,) --> reachable>>.

260

//The robot is able to reach t002.

//outputMustContain('<(*,SELF,{t002}) --> reachable>. :!0: %1.00;0.81%')


//The robot is able to reach t002.

<(*,SELF,{t002}) --> reachable>. :|:

//The goal for the robot is to make t002 reachable and then pick it.

(&/,<(*,SELF,{t002}) --> reachable>,(^pick,{t002}))!

45

//The goal maybe to pick t002.

//outputMustContain('(^pick,{t002})! %1.00;0.43%')


//The robot is able to reach t002.

<(*,SELF,{t002}) --> reachable>. :|:

//If the robot reach t002 and pick it, the robot will hold t002.

<(&/,<(*,SELF,{t002}) --> reachable>,(^pick,{t002}))=/><(*,SELF,{t002}) --> hold>>.

1

//If the robot pick t002, it will hold t002.

//outputMustContain('<(^pick,{t002}) =/> <(*,SELF,{t002}) --> hold>>. :!0: %1.00;0.81%')


//t002 is picked.

(^pick,{t002}). :\:

//If the robot pick t002, it will hold t002.

<(^pick,{t002})=/><(*,SELF,{t002}) --> hold>>. :\:

20

//The robot is holding t002.

//outputMustContain('<(*,SELF,{t002}) --> hold>. :!0: %1.00;0.81%')


//The robot is holding t002.

<(*,SELF,{t002}) --> hold>. :|:

//The robot should hold t002, then arrive t001 and open t001.

(&/,<(*,SELF,{t002}) --> hold>,+100,<(*,SELF,{t001}) --> at>,+100,(^open,{SELF},{t001}))!

30

//The robot should arrive t001 then open t001.

//outputMustContain('(&/,<(*,SELF,{t001}) --> at>,+100,(^open,{SELF},{t001}))! :!100: %1.00;0.73%')


//If the robot hold t002, then arrive t001 and open it, t001 will be opened.

<(&/,<(*,SELF,{t002}) --> hold>,<(*,SELF,{t001}) --> at>,(^open,{SELF},{t001})) =/> <{t001} --> [opened]>>. %1.00;0.90%

//The robot is holding t002 now.

<(*,SELF,{t002}) --> hold>. :|:

200

//If the robot arrive t001 and open it, t001 may be opened.

//outputMustContain('<(&/,<(*,SELF,{t001}) --> at>,(^open,{SELF},{t001})) =/> <{t001} --> [opened]>>. %1.00;0.43%')


//The goal for the robot is to reach t001 and then open t001.

(&/,<(*,SELF,{t001}) --> at>,(^open,{t001}))!

13

//The goal for the robot is to reach t001.

//outputMustContain('<(*,SELF,{t001}) --> at>! %1.00;0.81%')


//The goal is to reach t001.

<(*,SELF,{t001}) --> at>!

//If go to somewhere, the robot will be at there.

<(^go-to,)=/><(*,SELF,) --> at>>.

500

//The goal is to go to t001.

//outputMustContain('(^go-to,{t001})! %1.00;0.81%')


//The robot went to t001.

(^go-to,{SELF},{t001}). :\:

//If go to somewhere, the robot will be at there.

<(^go-to,{SELF},)=/><(*,{SELF},) --> at>>.

41

//Was the robot at t001?

IN: <(*,{SELF},{t001}) --> at>? :\:

140

//The robot was at t001.

//outputMustContain('<(*,{SELF},{t001}) --> at>. :!0: %1.00;0.81%')


//The robot is at t001 now.

<(*,SELF,{t001}) --> at>. :|:

//If the robot arrive t001 and open it, t001 will be opened.

<(&/,<(*,SELF,{t001}) --> at>,+100,(^open,{t001}))=/><{t001} --> [opened]>>. :|:

20

//If the robot open t001, t001 will be opened.

//outputMustContain('<(^open,{t001}) =/> <{t001} --> [opened]>>. :!100: %1.00;0.81%')


//The robot is at t001 now.

<(*,SELF,{t001}) --> at>. :|:

//The goal is to arrive t001 and then open t001.

(&/,<(*,SELF,{t001}) --> at>,(^open,{SELF},{t001}))!

25

//The goal maybe to open t001.

//outputMustContain('(^open,{SELF},{t001})! %1.00;0.43%')


//If the robot open t001, t001 will be opened.

<(^open,{SELF},{t001})=/><{t001} --> [opened]>>. :|:

//The robot open t001.

(^open,{SELF},{t001}). :|:

1

//t001 is opened.

//outputMustContain('<{t001} --> [opened]>. :!5: %1.00;0.81%')


//If the robot hold t002, then go to t001 and open it, t001 will be opened.

<(&/,<(*,Self,{t002}) --> hold>,(^go-to,{t001}),(^open,{t001})) =/> <{t001} --> [opened]>>.

//If the robot is able to reach t002 and pick it, the robot will hold t002.

<(&/,<(*,Self,{t002}) --> reachable>,(^pick,{t002})) =/> <(*,Self,{t002}) --> hold>>.

40

//If the robot is able to reach t002 and pick t002, then go to t001 and open t001, t001 will be opened.

//outputMustContain('<(&/,<(*,Self,{t002}) --> reachable>,(^pick,{t002}),(^go-to,{t001}),(^open,{t001})) =/> <{t001} --> [opened]>>. %1.00;0.81%')


//If item 1 is on item 2 and the robot is at item 2 at the same time, item 1 is reachable for the robot.

<(&|,<(*,,) --> on>,<(*,Self,) --> at>) =|> <(*,Self,) --> reachable>>.

//t002 is on t003 now.

<(*,{t002},{t003}) --> on>. :|:

80

//If the robot is at t003, then t002 is reachable for the robot.

//outputMustContain('<<(*,Self,{t003}) --> at> =|> <(*,Self,{t002}) --> reachable>>. :!0: %1.00;0.81%')


//If the robot is at t003 and pick t002, then go to t001 and open t001, t001 will be opened.

<(&/,<(*,Self,{t003}) --> at>,(^pick,{t002}),(^go-to,{t001}),(^open,{t001})) =/> <{t001} --> [opened]>>. :|:

//If go to somewhere, the robor will be at there.

<(^go-to,) =/> <(*,Self,) --> at>>.

16

//If the robot goes to t003 and pick t002, then go to t001 and open t001, t001 may be opened.

//outputMustContain('<(&/,(^go-to,{t003}),(^pick,{t002}),(^go-to,{t001}),(^open,{t001})) =/> <{t001} --> [opened]>>. %1.00;0.43%')


//The goal is to make t001 opened.

<{t001} --> [opened]>!

//If the robot go to t003 and pick t002, then go to t001 and open t001, t001 will be opened.

<(&/,(^go-to,{t003}),(^pick,{t002}),(^go-to,{t001}),(^open,{t001})) =/> <{t001} --> [opened]>>. :|:

24

//The goal may be to go to t003 and pick t002, then go to t001 and open t001.

//outputMustContain('(&/,(^go-to,{t003}),(^pick,{t002}),(^go-to,{t001}),(^open,{t001}))! %1.00;0.43%')


//The goal is to make t001 opened.

<{t001} --> [opened]>!

//If the robot is at t001 and break t001, t001 will be opened.

<(&/,<(*,Self,{t001}) --> at>,(^break,{t001})) =/> <{t001} --> [opened]>>.

28

//The goal is to arrrive t001 and break t001.

//outputMustContain('(&/,<(*,Self,{t001}) --> at>,(^break,{t001}))! %1.00;0.81%')


//The goal is to arrrive t001 and break t001.

(&/,<(*,Self,{t001}) --> at>,(^break,{t001}))!

//Now the robot is at t001.

<(*,Self,{t001}) --> at>. :|:

25

//The goal maybe to break t001.

//outputMustContain('(^break,{t001})! %1.00;0.43%')


//If break something, it will be damaged.

<(^break,) =/> < --> [damaged]>>.

//The goal is to make t001 damaged.

<{t001} --> [damaged]>!

17

//The goal is to break t001.

//outputMustContain('(^break,{t001})! %1.00;0.81%')


//The goal is not to break t001.

(^break,{t001})! %0.00;0.86%

1

//The goal is to break t001.

(^break,{t001})! %1.00;0.73%

1

//The goal may be not to break t001.

//outputMustContain('(^break,{t001})! %0.31;0.90%')


//The goal may be not to break t001.

(^break,{t001})! %0.31;0.89%

1

//The goal is to break t001

(^break,{t001})! %1.00;0.95%

1

//The goal may be to break t001.

//outputMustContain('(^break,{t001})! %0.79;0.96%')


//The robot is able to reach the key001 now.

<(*,Self,key001) --> reachable>. :|:

//If the robot is able to reach key001, and pick key001, the robot will hold key001.

<(&/,<(*,Self,key001) --> reachable>,(^pick,key001)) =/> <(*,Self,key001) --> hold>>.

1

//If the robot pick key001, it will hold key001.

//outputMustContain('<(^pick,key001) =/> <(*,Self,key001) --> hold>>. :!0: %1.00;0.81%')


//If the robot pick key001, it will hold key001.

<(^pick,key001) =/> <(*,Self,key001) --> hold>>. :|:

//The goal is to hold key001.

<(*,Self,key001) --> hold>!

8

//The goal maybe to pick key001.

//outputMustContain('(^pick,key001)! %1.00;0.43%')


//Key001 was picked.

(^pick,key001). :\:

//If the robot pick key001, it will hold key001.

<(^pick,key001) =/> <(*,Self,key001) --> hold>>.

15

//The robot is holding key001.

//outputMustContain('<(*,Self,key001) --> hold>. :!0: %1.00;0.81%')


//The robot is holding key001.

<(*,Self,key001) --> hold>. :|: %1.00;0.81%

1

//The robot is holding key001. <(*,Self,key001) --> hold>. :|:

5

//The robot is holding key001.

//outputMustContain('<(*,Self,key001) --> hold>. :!1: %1.00;0.93%')


//The robot is not holding key001.

<(*,Self,key001) --> hold>. :|: %0%

5

//The robot is holding key001.

<(*,Self,key001) --> hold>. :|: %1.00;0.91%

5

//Is the robot holding key001?

<(*,Self,key001) --> hold>? :|:

50

//The robot may be holding key001.

//outputMustContain('<(*,Self,key001) --> hold>. :!5: %0.53;0.95%')


//If pick key001, the robot will hold key001.

<(^pick,key001) =/> <(*,Self,key001) --> hold>>. :\: %1.00;0.90%

//If pick key001, the robot may hold key001.

<(^pick,key001) =/> <(*,Self,key001) --> hold>>. :\: %1.00;0.45%

35

//If pick key001, the robot will hold key001.

//outputMustContain('<(^pick,key001) =/> <(*,Self,key001) --> hold>>. :!-5: %1.00;0.91%')


//The key001 is reachable for the robot now.

<(*,Self,key001) --> reachable>. :|:

11

//If the pick key001, the robot will hold key001.

<(^pick,key001) =/> <(*,Self,key001) --> hold>>. :|:

20

//If the key001 is reachable for the robot and the robot picks the key001, the robot may hold hey001.

//outputMustContain('<(&/,<(*,Self,key001) --> reachable>,+11,(^pick,key001)) =/> <(*,Self,key001) --> hold>>. :!11: %1.00;0.45%')


//If the key001 is reachable for the robot and the robot picks the key001, the robot will hold hey001.

<(&/,<(*,Self,key001) --> reachable>,(^pick,key001)) =/> <(*,Self,key001) --> hold>>.

//Now the key001 is reachable.

<(*,Self,key001) --> reachable>. :|:

1

//If the robot pick key001, it will hold key001.

//outputMustContain('<(^pick,key001) =/> <(*,Self,key001) --> hold>>. :!0: %1.00;0.81%')


//If pick the key001 ,the robot will hold the key001.

<(^pick,key001) =/> <(*,Self,key001) --> hold>>. :|: %1.00;0.81%

//The goal is to hold key001.

<(*,Self,key001) --> hold>!

10

//The goal maybe to pick key001.

//outputMustContain('(^pick,key001)! %1.00;0.40%')


//The robot picks key001.

(^pick,key001). :|:

//If pick the key001 ,the robot will hold the key001.

<(^pick,key001) =/> <(*,Self,key001) --> hold>>. :|: %1.00;0.81%

8

//The robot will hold the key001.

//outputMustContain('<(*,Self,key001) --> hold>. :!5: %1.00;0.73%')


//The robot is holding key001.

<(*,Self,key001) --> hold>. :|: %1.00;0.73%

6

//The robot is holding key001

<(*,Self,key001) --> hold>. :|: %1.00;0.90%

10

//The robot is holding key001

//outputMustContain('<(*,Self,key001) --> hold>. :!6: %1.00;0.92%')


//'a' is a type of 'A'

<a --> A>. :|:

10

//The robot picks key001

(^pick,{SELF},key001). :|: %1.00;0.90%

11

//The robot holds key001

<(*,Self,key001) --> hold>. :|:

16

//If 'a' is a type of 'A', and the robot pick key001, the robot may hold key001.

//outputMustContain('<(&/,<a --> A>,+10,(^pick,{SELF},key001),+11) =/> <(*,Self,key001) --> hold>>. :!21: %1.00;0.42%')

//adjusted +3 to +4 ^


//If the robot pick key001, it will hold key001.

<(^pick,key001) =/> <(*,Self,key001) --> hold>>. :|: %1.00;0.81%

1

//If the robot pick key001, it may hold key001.

<(^pick,key001) =/> <(*,Self,key001) --> hold>>. :|: %1.00;0.45%

10

//If the robot pick key001, it will hold key001.

//outputMustContain('<(^pick,key001) =/> <(*,Self,key001) --> hold>>. :!1: %1.00;0.84%')


//The key001 is reachable

<(*,Self,key001) --> reachable>. :|:

11

//If pick key001, the robot will hold key001.

<(^pick,key001) =/> <(*,Self,key001) --> hold>>. :|: %1.00;0.84%

17

//If key001 is reachable and the robot pick key001, it may hold key001.

//outputMustContain('<(&/,<(*,Self,key001) --> reachable>,+11,(^pick,key001)) =/> <(*,Self,key001) --> hold>>. :!11: %1.00;0.43%')


//If key001 is reachable and the robot pick key001, it will hold key001.

<(&/,<(*,Self,key001) --> reachable>,(^pick,key001)) =/> <(*,Self,key001) --> hold>>. %1.00;0.90%

1

//If key001 is reachable and the robot pick key001, it may hold key001.

<(&/,<(*,Self,key001) --> reachable>,(^pick,key001)) =/> <(*,Self,key001) --> hold>>. %1.00;0.43%

1

//If key001 is reachable and the robot pick key001, it will hold key001.

//outputMustContain('<(&/,<(*,Self,key001) --> reachable>,(^pick,key001)) =/> <(*,Self,key001) --> hold>>. %1.00;0.91%')


// Add operator

(^add,{SELF},2,3,?1)!

//outputMustContain('(^add,{SELF},2,3,5). :!0: %1.00;0.90%')


// Count operator

(^count,{SELF},{a,b,c,d},?1)!

//outputMustContain('(^count,{SELF},{a,b,c,d},4). :!0: %1.00;0.90%')


// Reflect operator

(^reflect,{SELF},<cat --> animal>,?1)!

10

//outputMustContain('(^reflect,{SELF},<cat --> animal>,<(*,cat,animal) --> inheritance>). :!0: %1.00;0.90%')


visit #nars (more active) and ##nars on FreeNode

Clone this wiki locally