Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox”...

23
Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003

Transcript of Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox”...

Page 1: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Tools to Model Agent Based Systems

Florian Twaroch

Forschungsseminar „Scientist’s Toolbox”

Vienna, 25.11.2003

Page 2: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Overview

● Agent Based Systems– Agent– Multi Agent Systems

● Formal Tools– Algebra– Category Theory– Haskell

● Example– From Early Learning to a Theory of Space

● Conclusion & Outlook

Page 3: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Agent

● Agens ... acting● Anything that can be viewed as perceiving its

environment trough sensors and acting upon the environment through effectors [Russel and Norvig 1995]

● An agent is a computer system that is situated in some environment, and that is capable of autonomous action in this environment in order to meet its design objectives [Woolridge 1999]

● Ferber 1998, Weiss 1999, ...

Page 4: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

History

● Distributed Artificial Intelligence (DAI)– Artificial intelligence– Intelligent software– Complex Agents– Assumptions about agent's behaviour

● Social Simulation– Focus on social interaction– Roots in Cellular Automata – Simple Agents– Multi Agent Systems, no assumptions

about behaviour

Page 5: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Multi Agent Systems (MAS)

● Several actors in a simulated environment

● Common activities have to be coordinated through communication processes– Cooperation – Several agents have a

common goal– Negotiation – competitive agents

having individual goals

Page 6: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Agent Architectures [Woolridge 1999, Russel

and Norvig 1995]● Simple reflex agent

– Reacts on condition reaction rules● Reflex agent with internal state

– Current percept is combined with the old internal state to generate updated internal state

● Goal-based agent– Additional information describing desired goals

● Utility-based agent– Evaluation of decision alternatives by utility

function

Page 7: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Agent - Two tier model [Frank 2000]

● Two tiered reality and beliefs model– Facts (simulated environment)– Beliefs (agent)

● Models Errors in a person's perception

Real World Model

World Environment

Person Agent

Fact Belief

Page 8: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Environment [Russel and Norvig 1995]

● Artificial vs. Real Environment– Artificial can be kept simple– Real have to be abstracted

● Properties– Accessible vs. Inaccessible– Deterministic vs. Non-deterministic

● next state is determined by current state and selected actions

– Episodic vs. Non-episodic● Result of action depends only on current perception-action

cycle– Static vs. Dynamic– Discrete vs. Continous

● Chess game (Finite set of actions and percepts) vs. Driving Car

Page 9: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Formal Tools

AlgebraMorphisms

Category TheoryHaskell

Page 10: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Algebraic Specification (Loeckx, Ehrich et al 1996)

● a set S of sorts, naming the object classes

● a set O of operations with their arguments and result sorts

● a set E of axioms defining the behavior of these operations

Page 11: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Morphism

● Signature Morphism– Data Structures

● Homomorphism– Line intersection

● Isomorphism– Adjustment calculation

● Finding or assuming morphisms helps to structure models.

Domain A Domain B

f1 f2

hs'

hs

a' b'

a b

Page 12: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Category Theory [Eilenberg and Lane 1945]● Algebra of functions● NOT the category theory of cognitive

science, that forms classes by similar objects [Rosch 1978]

● Goal: Reveal universal properties of structures of a given kind via their relationships with one another.

● Transport mathematical problems via functors .

Page 13: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

From Early Learning To a Theory of Space

● Wordnet 1.7.1 – three senses– Theory – a belief that can guide

behavior– A concept that is not yet verified but

that if true would explain certain facts or phenomena

– An organized system of accepted knowledge that applies in a variety of circumstances to explain a specific set of phenomena.

Page 14: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Algebra Based Agent

● General approach: Early learning and development of children [Gopnik and Meltzoff 2001, Piaget 1975, Bower 1982]

● Identify key concepts in the different stages of development

● Find common features● Agent can choose between

alternatives and might have preferences!

Page 15: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Early Prototype

● World– DB with named objects – objects can be placed at a certain

position in space.● Agent

– observe objects– build knowledge (beliefs)– give description

Page 16: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Sandbox Geography

● Theory, Theory: “Infants learn about the world by forming and revising theories. Their conceptual development is theory formation and change, their semantic development is theory dependent.” [Gopnik and Meltzoff 2002]

● Children solve the problem of knowledge by:

– Innate knowledge– Powerful learning abilities– Unconcious tution from adults

Page 17: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Object appearances (9 month)

● Objects will reappear at the position where they disappeared– World with named objects

● Objects exist | no existence● Objects disappear● Objects can reappear at the same position

where they have been perceived before (prediction) | confusion

– Second agent (mother, father, ...)

Page 18: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Theories through child’s development

● Place theory: Objects can change their properties/features but not their trajectory

● Trajectory theory: Objects can change their trajectory but not their properties/features.

Page 19: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Adult theory on object appearances

● Laws governing the movement of objects

● Objects have properties● Spatial relations between stationary

objects● Laws governing the perception

between object and observer

Page 20: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Hypothesis

A theory of space can be described by a set of axioms.

It is possible to revise the theory by the exchange of its

axioms.

Page 21: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Approach

● Conceptual Model● Build Axioms

– Spatial Relations Contain– Aggregation– Navigation – Pointing Action– Social Interaction: Causality

● Complete Formalization– Look for Morphisms– Rapid Prototyping using Haskell– Redesign Model

● Computational Model– Final Prototype– Space Theories in Algebra

Page 22: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

Conclusion & Outlook

● Keep the conceptual model simple● Exercise Algebra● Formalisation of a Cognitive Agent● Libraries and Code Reuse

– Do we share code in our group?– Should we have coding conventions?

Page 23: Tools to Model Agent Based Systems Florian Twaroch Forschungsseminar „Scientist’s Toolbox” Vienna, 25.11.2003.

References

Bird, R. (1998). Introduction to Functional Programming Using Haskell. Hemel Hempstead, UK, Prentice Hall Europe.

Bower, T.G.R. (1982). Development in infancy (2nd ed.). San Francisco: W. H. FreemanEilenberg, S., S. M. Lane (1945) General Theory of natural equivalences. Transactions of the A.M.S. 58,

231 - 294Ferber, J., Ed. (1998). Multi-Agent Systems - An Introduction to Distributed Artificial Intelligence,

Addison-Wesley.Frank, A. U. (1999). One Step up the Abstraction Ladder: Combining Algebras - From Functional Pieces

to a Whole. Spatial Information Theory - Cognitive and Computational Foundations of Geographic Information Science (Int. Conference COSIT'99, Stade, Germany). C. Freksa and D. M. Mark. Berlin, Springer-Verlag. 1661: 95-107.

Frank, A. U. (2000). "Spatial Communication with Maps: Defining the Correctness of Maps Using a Multi-Agent Simulation." Spatial Cognition II: 80-99.

Frank, A. U. (2001). "Tiers of ontology and consistency constraints in geographic information systems." International Journal of Geographical Information Science 15(7 (Special Issue on Ontology of Geographic Information)): 667-678.

Gopnik, A. and A. N. Meltzoff (2002). Words, Thoughts, and Theories. Cambridge, Massachusetts, MIT Press.

Gopnik, A., A. N. Meltzoff, et al. (2001). The Scientist in the Crib - What early learning tells us about the mind. New York, Perennial - HarperCollins.

Loeckx, J., H.-D. Ehrich, et al. (1996). Specification of Abstract Data Types. Chichester, UK and Stuttgart, John Wiley and B.G. Teubner.

Piaget, J. and B. Inhelder (1999). Die Entwicklung des räumlichen Denkens beim Kinde. Stuttgart, Klett-Cotta.

Piaget, J., B. Inhelder, et al. (1975). Die natürliche Geometrie des Kindes. Stuttgart, Ernst Klett Verlag.Rosch, E. (1978). Principles of categorization. Cognition and categorization. E. Rosch and B. B. Lloyd

(eds.), Hillsdale, NJ, ErlbaumRussel, S. J., P. Norvig (1995) Artificial Intelligence – A Modern Approach. London Prentice-Hall

International, Inc.Weiss, G. (1999). Multi-Agent Systems: A Modern Approach to Distributed Artificial Intelligence.

Cambridge, Mass., The MIT Press.Woolridge, M. (1999). Intelligent Agents. Multiagent Systems – A modern Approach to Distributed

Artificial Intelligence. G. Weiss (ed.). Cambridge, Massachusetts, The MIT Press.