ebook img

Artificial Intelligence - Exercises - Agents and Environments [math] PDF

165 Pages·2010·6.46 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Artificial Intelligence - Exercises - Agents and Environments [math]

William Teahan Artifi cial Intelligence: Exercises – Agents and Environments 2 Artifi cial Intelligence: Exercises – Agents and Environments © 2010 William Teahan & Ventus Publishing ApS ISBN 978-87-7681-591-2 3 Artifi cial Intelligence: Exercises – Agents and Environments Contents Contents Preface 7 1. Introduction 13 1.1 What is ”Artifi cial Intelligence”? 13 1.2 Paths to Artifi cial Intelligence 14 1.3 Objections to Artifi cial Intelligence 15 1.4 Conceptual Metaphor, Analogy and Thought Experiments 16 1.5 Design Principles for Autonomous Agents 16 2. Agents and Environments 17 2.1 What is an Agent? 17 2.2 Agent-oriented Design Versus Object-oriented Design 17 2.3 A Taxonomy of Autonomous Agents 17 2.4 Desirable Properties of Agents 18 2.5 What is an Environment? 19 2.6 Environments as n-dimensional spaces 20 2.7 Virtual Environments 20 2.8 How can we develop and test an Artifi cial Intelligence system? 22 3. Frameworks for Agents and Environments 23 3.1 Architectures and Frameworks for Agents and Environments 23 3.2 Standards for Agent-based Technologies 23 3.3 Agent-Oriented Programming Languages 23 3.4 Agent Directed Simulation in NetLogo 23 3.5 The NetLogo development environment 30 4 Artifi cial Intelligence: Exercises – Agents and Environments Solutions to Selected Exercises 3.6 Agents and Environments in NetLogo 36 3.7 Drawing Mazes using Patch Agents in NetLogo 53 4. Movement 59 4.1 Movement and Motion 59 4.2 Movement of Turtle Agents in NetLogo 60 4.3 Behaviour and Decision-making in terms of movement 63 4.4 Drawing FSMs and Decision Trees using Link Agents in NetLogo 64 4.5 Computer Animation 70 4.6 Animated Mapping and Simulation 79 5. Embodiment 81 5.1 Our body and our senses 81 5.2 Several Features of Autonomous Agents 81 5.3 Adding Sensing Capabilities to Turtle Agents in NetLogo 82 5.4 Performing tasks reactively without cognition 88 5.5 Embodied, Situated Cognition 95 Solutions to Selected Exercises 97 5 Artifi cial Intelligence: Exercises – Agents and Environments Exercises for Artificial Intelligence – Agents and Environments Selection of screenshots taken from NetLogo models described in this book. 6 Artifi cial Intelligence: Exercises – Agents and Environments Preface Preface The list of exercises, chapter headings and section, and NetLogo models in this book closely follow what is in the companion “Artificial Intelligence – Agent Behaviour I” book. The best way to learn about what is written in the companion book is to try out each of the NetLogo models that are described in the book and in the exercises below. An index of the models used in these books can be found using the following URL: NetLogo Models for Artificial Intelligence http://files.bookboon.com/ai/index.html A table listing all the models described in this book and the companion book is also provided below. Each entry in the table lists the name of the model, the exercises where it is described, a short description of the model, and a URL where it can be found. Each of these models have sections in the Information tab that provide various documentation, such as: what the model is; how it works; how to use it; the meaning of each of the Interface’s buttons, sliders, switches, choosers, monitors, plots and output; important things to notice; things to try out; suggestions for extending the model; explanations of interesting NetLogo features used in the model; credits and references; and links to related models. In particular, the sections on how to use it, things to notice and things to try out provide some suggestions on various things a user can try when playing with the models. The reader, however, should not restrict themselves to just these suggestions. Due to the complex system nature of many of the simulations that result from the running of these NetLogo models, often unforeseen phenomena emerge as a result of the agent – agent and agent – environment interactions. The reader is encouraged to become an ‘explorer’ of the virtual environments created by these models by trying out as many of the different combinations of the slider, switch and chooser values as possible while running the simulations many times to ensure that a representative sampling of the possible system behaviours is observed. Agents Animation (4.5.5, Solution to 4.5.5) This model performs a simple animation of various turtle agent shapes to give the impression that they are flowing past the observer. http://files.bookboon.com/ai/Agent-Animation.html Ants (5.4.1) This model simulates a colony of ants foraging for food. In NetLogo’s Models Library: Biology > Ants. http://ccl.northwestern.edu/netlogo/models/Ants Chevening House Maze (3.7.2) This model draws a schematic representation of the Chevening House garden maze. http://files.bookboon.com/ai/Chevening-House-Maze.html 7 Artifi cial Intelligence: Exercises – Agents and Environments Preface Chevening House Maze with Coloured Islands (3.7.4, Solution to 3.7.4) This model colours the islands in the Chevening House garden maze. http://files.bookboon.com/ai/Chevening-House-Maze-with-Coloured-Islands.html Chevening House Maze with Wall Following (3.7.2, Solution to 3.7.2) This model gets a turtle to wander around the Chevening House maze using wall following behaviour.http://files.bookboon.com/ai/Chevening-House-Maze-with-Wall-Following.html Climate Change (3.5.4) This is a model of energy flow in the earth and simulates climate change due to the presence of CO2 and clouds, for example. In NetLogo’s Model Library: Earth Science > Climate Change. http://ccl.northwestern.edu/netlogo/models/ClimateChange Continental Divide (4.6.1) This model animates one method for finding the continental divide. In NetLogo’s Model Library: Earth Science > Continental Divide. http://ccl.northwestern.edu/netlogo/models/ContinentalDivide Empty Maze (3.6.7) This model draws an empty maze with no inside walls. http://files.bookboon.com/ai/Empty-Maze.html Empty Maze with Wall Following (3.6.7, Solution to 3.6.7) This model gets a turtle to wander around the empty maze using wall following behaviour. http://files.bookboon.com/ai/Empty-Maze-with-Wall-Following.html Follow Trail (5.5.2, Solution to 5.5.2, 5.5.3, Solution to 5.5.3) This model allows the user to test out various trail following behaviours for ants. It is an extension of the Santa Fe Trail model. http://files.bookboon.com/ai/Follow-Trail.html Foxes and Rabbits (3.6.2) This model creates 100 foxes and 1000 rabbits.http://files.bookboon.com/ai/Foxes-and-Rabbits.html Foxes and Rabbits 2 (4.2.7, Solution to 4.2.7) This model creates foxes and rabbits. Once created, the rabbits move away from the foxes if they are too near. http://files.bookboon.com/ai/Foxes-and-Rabbits-2.html Grand Canyon (4.6.2) This model simulates rainfall in part of the Grand Canyon. In NetLogo’s Model Library: Earth Science > Grand Canyon. http://ccl.northwestern.edu/netlogo/models/GrandCanyon Hampton Court Maze (3.7.1) This model draws a schematic representation of the Hampton Court Palace garden maze. http://files.bookboon.com/ai/Hampton-Court-Maze.html Hampton Court Maze with Turtle (4.2.6, Solution to 4.2.6) This model gets a turtle to wander around the start of the Hampton Court maze using simple commands. http://files.bookboon.com/ai/Hampton-Court-Maze-with-Turtle.html Hampton Court Maze with Wall Following (3.7.1, Solution to 3.7.1) This model gets a turtle to wander around the Hampton Court maze using wall following behaviour. http://files.bookboon.com/ai/Hampton-Court-Maze-with-Wall-Following.html 8 Artifi cial Intelligence: Exercises – Agents and Environments Preface Hatch Example (3.6.3) This model demonstrates the use of the hatch command to simulate turtles reproducing and dying. http://ccl.northwestern.edu/netlogo/models/HatchExample Hill Climbing Example 2 (5.3.1) This model show how to give turtle agents a sense of what’s up and what’s down to perform hill climbing. In NetLogo Model’s Library: Code Examples > Hill Climbing Example. See modified code at: http://files.bookboon.com/ai/Hill-Climbing-Example-2.html Hill Climbing with Wall Following (5.3.1, Solution for 5.3.1) This model implements turtle agents that can use a sense of what’s up or down to perform hill climbing, or use a sense of touch via proximity detection to perform wall following, or can do both. http://files.bookboon.com/ai/Hill-Climbing-with-Wall-Following.html Life Cycle Stages (4.4.2) This model shows an example of finite state automata (FSA) that represents the life cycle stages of people throughout their lives. http://files.bookboon.com/ai/Life-Cycle-Stages.html Life Example (3.6.3, 3.6.4) This model shows how to use some simple commands in NetLogo to simulate the life cycle of people.http://files.bookboon.com/ai/Life-Example.html Line of Sight Example 2 (5.3.1) This model shows how to provide turtles with a rudimentary sense of vision based on simulating a line of sight. In NetLogo Model’s Library: Code Examples > Line of Sight Example. See modified code at: http://files.bookboon.com/ai/Line-of-Sight-Example-2.html 9 Artifi cial Intelligence: Exercises – Agents and Environments Preface Load File (3.5.5, 3.5.6, Solution to 3.5.5 & 3.5.6) This model shows how to load text from a file. http://files.bookboon.com/ai/Load-Text.html Look Ahead Example 2 (5.3.1) This model shows how to provide turtles with a rudimentary sense analogous to the sense of vision. In NetLogo Model’s Library: Code Examples > Look Ahead Example. See modified code at: http://files.bookboon.com/ai/Look-Ahead-Example-2.html Mazes (5.4.2) This model shows how to get a simple reactive turtle agent to move around a maze. http://files.bookboon.com/ai/Mazes.html Mazes-2 (5.4.4, Solution for 5.4.4) This extends the Mazes model by adding the Butterfly Maze, and two further behaviours based on those from the Searching Mazes model. http://files.bookboon.com/ai/Mazes-2.html N Dimensional Space (2.6.1, 3.6.5, 3.6.6) This model visualises N dimensional data concerning New Zealand All Blacks. http://files.bookboon.com/ai/N-Dimensional-Space.html Nested Squares (3.6.8, Solution to 3.6.8) This model provides a solution to Exercise 3.6.8. It draws nested squares six different ways. http://files.bookboon.com/ai/Nested-Squares.html Nested Triangles (4.2.3, 4.2.4, 4.2.5, Solutions for 4.2.3, 4.2.4, 4.2.5) This model provides solutions to Exercises 4.2.3, 4.2.4 and 4.2.5. It can be used to draw elaborate patterns made out of equilateral triangles. http://files.bookboon.com/ai/Nested-Triangles.html NZ Birds (4.4.4) This model constructs and animates a decision tree for the problem of identifying New Zealand birds.http://files.bookboon.com/ai/NZ-Birds.html Santa Fe Trail (3.6.12, 4.3.1, 5.5.1, Solution to 3.6.12, 4.3.1, 5.5.1, 5.5.3 & 5.5.4) This model tests out various behaviours as solutions to the Santa Fe Ant Trail problem. http://files.bookboon.com/ai/Santa-Fe-Trail.html Shape Animation Example (4.5.1) This model demonstrates how to do basic animation using shapes. In NetLogo’s Models Library: Code Examples > Shape Animation Example. http://ccl.northwestern.edu/netlogo/models/ShapeAnimationExample Shuffle Cards (3.6.10, Solution to 3.6.10) This model shuffles a pack of cards. http://files.bookboon.com/ai/Shuffle-Cards.html Shuffle and Deal Cards (3.6.10, Solution to 3.6.10) This model shuffles and deals a pack of cards. http://files.bookboon.com/ai/Shuffle-and-Deal-Cards.html Simple Walk (4.2.1, 4.2.2, Solutions for 4.2.1 and 4.2.2) This model provides solutions to Exercises 4.2.1 and 4.2.2. It gets a turtle to execute some simple walking commands. http://files.bookboon.com/ai/Simple-Walk.html 10

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.