Examples and Exercises from the Book!
The best way to learn a new programming language is by trying the examples and doing exercises. We have made the code used in the book for all the examples and exercises available from this page. We will soon have model answers for the exercises too.
So why not download Jason and the code below and try the examples yourself!!!
Chapter 1: Introduction
-
•Hello World: example of AgentSpeak in Section 1.4
-
•Factorial: example of AgentSpeak in Section 1.4
Chapter 3: The Jason Agent Programming Language
-
•Domestic Robot: example of AgentSpeak in Section 3.4, also used in exercises
Chapter 4: Jason Interpreter
-
•Plan Failure: example of plan failure in Section 4.2
-
•Domestic Robot: used in exercise 3
-
•Atomic Annotation: used in exercise 4
Chapter 5: Environments
-
•Vacuum Cleaning: example of environment code in Section 5.1 and used in exercise 1
-
•Domestic Robot: example of environment code in Section 5.2 and used in exercise 2
-
•Room: used in exercise 3
Chapter 6: Communication and Interaction
-
•Contract Net Protocol: example of communication in Section 6.3 and used in exercises of this chapter
-
•Domestic Robot: used in exercise 1
-
Chapter 7: User-Defined Components
-
•Internal Action: example of internal action for odd numbers in Section 7.1
-
•Idle Agent: example of agent class customisation in Section 7.2
-
•Vacuum Cleaning: example of agent class customisation in Section 7.2 and agent architecture customisation in Section 7.3
-
•Domestic Robot: example of agent architecture customisation in Section 7.3
-
•Custom Belief Base: example of belief base customisation in Section 7.4
-
•Directives: example of user defined directives in Section 7.5
Chapter 9: Case Studies
-
•Case Study I: Gold Miners
-
Some comments on possible solutions for the exercises are available
here; send us an
email asking for the username and password required to access the solutions.