Presentation is loading. Please wait.

Presentation is loading. Please wait.

IDK5151 3. kohtumine kaugõppijatega Prof Kuldar Taveter, Tallinna Tehnikaülikool.

Similar presentations


Presentation on theme: "IDK5151 3. kohtumine kaugõppijatega Prof Kuldar Taveter, Tallinna Tehnikaülikool."— Presentation transcript:

1 IDK5151 3. kohtumine kaugõppijatega Prof Kuldar Taveter, Tallinna Tehnikaülikool

2 Kohtumise kava Moodle probleemid Miniprojektide teemad ja küsimused Jason

3 Moodle probleemid Foorumid Jagatud failid

4 Miniprojektide teemad ja küsimused

5 BDI agent architecture

6 The execution loop of a basic BDI reasoner while there are unachieved goals do observe the environment; update beliefs; prioritise intentions to achieve; choose a plan for the intention; execute and monitor the plan; end while

7 An agent programmed in Jason Set of beliefs Set of plans Goals Events

8 Events in Jason A change of an agent’s beliefs through perception of the environment: denoted by +belief or –belief A change in the agent’s goals: denoted by +!goal or –!goal

9 The general pattern for representing Jason plans event : context -> body;

10 Actions in Jason Standard internal actions starting with ‘.’: for example,.print("I'm not happy!"); Adding a goal: !goal, for example, !givePresent(H); Removing a goal: -!goal, for example, -!play(Friend); Evaluating a predicate: ?predicate, for example ?happyLevel(K); Replacing a belief: -+predicate, for example, -+presentList(T);

11 An agent behaviour model of a Tamagotchi revisited

12 Knowledge base happyLevel(0). myFriend(tamagotchi2). myMaster(person). !checkHappyLevel. presentNumber(2). presentList([toy,candy]).

13 Checking happiness level @p1 +!checkHappyLevel: happyLevel(M) & M <=20 <-.print("I'm not happy!");.my_name(I); ?happyLevel(K); ?myMaster(P);.send(P, tell, unhappy(I,K)).

14 Requesting visit @p2 +visitFriend: true <-.print("Could I come to your place?"); ?myFriend(Friend);.my_name(I);.send(Friend, tell, could_I_come_to_your_place(I)).

15 Receiving acceptance/sending greeting @p3 +please_come(P): true <-.print("Good day!");.my_name(I); ?myFriend(Friend);.send(Friend, tell, good_day(I)).

16 Receiving reply @p4 +hello(Friend): true <- !visit(Friend).

17 Setting the goals for sending a present or playing @p5 +!visit(Friend): presentNumber(M) & M >0 <- ?presentList([H|T]); -+presentList(T); !givePresent(H). @p6 +!visit(Friend): presentNumber(M) & M =0 <- !play(Friend).

18 Sending a present @p7 +!givePresent(Present): true <- ?happyLevel(L);.print("Please accept my present,",Present,"!(",L,")"); ?presentNumber(N); -+presentNumber(N -1); -+happyLevel(L + 4); ?myFriend(Friend);.my_name(I);.send(Friend,tell,accept_my_present(I, Present)).

19 Requesting to play @p8 +!play(Friend): happyLevel(M) & M <=20 <-.print("May I play with you,",Friend,"?(",M,")");.my_name(I);.send(Friend,tell,play_with_me(I,M)).

20 Thanking for the present @p9 +thanks(Friend,Present): true <- !play(Friend).

21 Receiving OK @p10 +ok(Friend,M): happyLevel(M) & M <=20 <- ?happyLevel(L); -+happyLevel(L + 2); !visit(Friend).

22 Jason in action

23 Ülesanne Laadige alla Jason aadressilt http://jason.sourceforge.net/ Looge kaks Jasoni agenti, mis tervitavad teineteist. Püüdke järgida tervitamise mudeleid.

24 Greeting Goal Model

25 Greeting Role Model Greetee: To be greeted by greeter Responsibilities: To be noticed by greeter; To perceive greeting Constraints: None Greeter: To greet another agent coming within environment Responsibilities: To notice greetee; To formulate greeting; To articulate greeting Constraints: Articulation within 10 seconds of noticing; Formulation must be appropriate to greetee + environment Evaluator: To evaluate the greeting Responsibilities: To observe greeting; To evaluate greeting; To publish report Constraints: timeliness

26 Combined behaviour and interaction model for greeting


Download ppt "IDK5151 3. kohtumine kaugõppijatega Prof Kuldar Taveter, Tallinna Tehnikaülikool."

Similar presentations


Ads by Google