Artificial Intelligence and Lisp Lecture 2 LiU Course TDDC65 Autumn Semester, 2010

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Artificial Intelligence and Lisp TDDC65 Course leader: Erik Sandewall Lab assistants: Henrik Lundberg, John Olsson Administrator: Anna Grabska Eklund Webpage:
Artificial Intelligence and Lisp #3 Characterization of Actions [Chapter 5] Representation Language [Chapter 2] Lab Assignment 2.
ISBN Chapter 3 Describing Syntax and Semantics.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
Project 1 Introduction to HTML.
1 Chapter 12 Working With Access 2000 on the Internet.
XP Browser and Basics1. XP Browser and Basics2 Learn about Web browser software and Web pages The Web is a collection of files that reside.
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.1 Introduction to Java.
Web Ontology Language for Service (OWL-S). Introduction OWL-S –OWL-based Web service ontology –a core set of markup language constructs for describing.
Artificial Intelligence and Lisp Lecture 4 LiU Course TDDC65 Autumn Semester, 2010
The Internet Useful Definitions and Concepts About the Internet.
CIS101 Introduction to Computing Week 05. Agenda Your questions CIS101 Survey Introduction to the Internet & HTML Online HTML Resources Using the HTML.
Artificial Intelligence and Lisp Lecture 6 LiU Course TDDC65 Autumn Semester, 2010
Artificial Intelligence and Lisp Lecture 3 LiU Course TDDC65 Autumn Semester, 2010
Outline Chapter 1 Hardware, Software, Programming, Web surfing, … Chapter Goals –Describe the layers of a computer system –Describe the concept.
Guide To UNIX Using Linux Third Edition
Describing Syntax and Semantics
Developing a Basic Web Page with HTML
Mgt 240 Lecture Website Construction: Software and Language Alternatives March 29, 2005.
1st Project Introduction to HTML.
Introduction to XML This material is based heavily on the tutorial by the same name at
Installing software on personal computer
HTML 1 Introduction to HTML. 2 Objectives Describe the Internet and its associated key terms Describe the World Wide Web and its associated key terms.
Chapter ONE Introduction to HTML.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
Linux Operations and Administration
1 Introduction to Web Development. Web Basics The Web consists of computers on the Internet connected to each other in a specific way Used in all levels.
INTRODUCTION TO WEB DATABASE PROGRAMMING
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting.
BIF713 Operating Systems & Project Management Instructor: Murray Saul
Advanced Java New York University School of Continuing and Professional Studies.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Knowledge representation
The Semantic Web Service Shuying Wang Outline Semantic Web vision Core technologies XML, RDF, Ontology, Agent… Web services DAML-S.
Spoken dialog for e-learning supported by domain ontologies Dario Bianchi, Monica Mordonini and Agostino Poggi Dipartimento di Ingegneria dell’Informazione.
CIS 451: Introduction to XML Dr. Ralph D. Westfall October, 2011.
Java Applets. 2 Introduction to Java Applet Programs  Applications are stand alone programs executed with Java interpreter executed with Java interpreter.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
Spoken Dialog Systems and Voice XML Lecturer: Prof. Esther Levin.
Chapter 1 Section 1.1 Introduction to Java Slides prepared by Rose Williams, Binghamton University Kenrick Mock, University of Alaska Anchorage.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
XML Engr. Faisal ur Rehman CE-105T Spring Definition XML-EXTENSIBLE MARKUP LANGUAGE: provides a format for describing data. Facilitates the Precise.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
COP 3813 Intro to Internet Computing Prof. Roy Levow Lecture 1.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
HTML Concepts and Techniques Fifth Edition Chapter 1 Introduction to HTML.
Web Services An Introduction Copyright © Curt Hill.
From XML to DAML – giving meaning to the World Wide Web Katia Sycara The Robotics Institute
EEL 5937 Content languages EEL 5937 Multi Agent Systems Lecture 10, Feb. 6, 2003 Lotzi Bölöni.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
General Architecture of Retrieval Systems 1Adrienn Skrop.
6/28/ A global mesh of interconnected networks (internetworks) meets these human communication needs. Some of these interconnected networks are.
HTML PROJECT #1 Project 1 Introduction to HTML. HTML Project 1: Introduction to HTML 2 Project Objectives 1.Describe the Internet and its associated key.
Artificial Intelligence and Lisp Lecture 6 LiU Course TDDC65 Autumn Semester,
Artificial Intelligence and Lisp Lecture 3 LiU Course TDDC65 Autumn Semester,
Artificial Intelligence and Lisp #3
Artificial Intelligence and Lisp TDDC65
Introduction to Algorithm Design
Java Applets.
World Wide Web “WWW”, "Web" or "W3". World Wide Web “WWW”, "Web" or "W3"
World Wide Web “WWW”, "Web" or "W3". World Wide Web “WWW”, "Web" or "W3"
Intro to PHP.
Modern Programming Languages Lecture 18 Fakhar Lodhi
Chapter 15 Functional Programming 6/1/2019.
Presentation transcript:

Artificial Intelligence and Lisp Lecture 2 LiU Course TDDC65 Autumn Semester,

List Processing - Recursive Functions (length.s) == (if [equal.s <>] 0 (+ 1 (length (t1.s)))) (replace.a.b.s) == (if [equal.s.a].b (if [atom.s] s (cons (replace.a.b (e1.s)) (replace.a.b (t1.s)) )))

The Autonomous Intelligent Agent Much of the software technology for A.I. systems centers around the concept of an autonomous intelligent agent. This is a software platform with good capabilities for the following: Representing a world model based on 'entities' and their relationships Representing the components of e.g. the BDI model or the HTN model as data so that they can be modified dynamically Contain the various algorithms etc that are need for aspects of the behavior Persist over time, e.g. so that learned behavior can be kept Communicate with other agents Interface to specialized software, e.g. sensors and actuators

Example Hierachical Task Network Goto Trainstation Go from Sth C to Globen Take train to Stockholm Walkto Busstop Take bus to Linköping C Wait for bus to Linköping C Go to Globen Preconditions: Bus stop close enough, agent is able to walk,... Preconditions: There is such a busline, bus actually arrives...

Formulas and Languages Language requirements for agent platform software: Support for expressing and using formulas in logic, for example for preconditions of actions Support for implementing a variety of specialized languages, for example for representing particular kinds of environment models, or for use in agent-to-agent communication, or for representing scripts for sequences of actions The language requirement is often met by identifying a common syntactic style that can be used by a set of related languages. The Lisp language is related to the syntactic style of S-expressions.

Implementation of Languages in a Style Implement a parser that converts expressions in that style to an internal representation as a datastructure For each of the participating languages, implement an interpreter or a compiler that operates on the datastructure Advantages: Less implementation work Enables library of programs that operate on internal representation and that can be used for several languages Greater uniformity of languages makes them easier to learn Facilitates embedding embedding one language in another, and cross-language invocation

S-expression Style Examples: color.red "Yes or no: " 421 (walkto busstop-4) (walk :from home :to busstop-4) (seq (walkto busstop-4)(takebus Lkp-C)) (set busstop-4 busstop-7 busstop-12) (+ (timefor (walkto busstop-d)) (timefor (waitfor (some (and bus (going-to Lkp-C)) ))) (timefor (go bus busstop-4 Lkp-C)) )

S-expression Style 1. Nested parenthesized expressions (lists) 2. Convention: operator as first element in list 3. Convention: use of tags e.g. :from, :to 4. Convention, sometimes: variables as ?vbl Can be used for programming language, but also for plain data, for logic, and for alternative languages S-expression-based programming languages: Lisp, Scheme

S-expression Style Can be used for programming language, but also for plain data, for logic, and for alternative languages S-expression-based programming languages: Lisp, Scheme Some other S-expression-based languages: KIF, Knowledge Interchange Format FIPA-ACL, Agent Communication Language PDDL, Planning Domain Definition Language

XML Style Example (from Web Ontology Language, OWL): <CabernetSauvignon rdf:ID="SantaCruzMountainVineyardCabernetSauvignon" >

XML Style Originates from SGML which was intended for markup of text, via HTML for markup of web pages XML wanted to have the same notation for markup of text and for structured data Use for programs and other formula languages was not considered initially but has been brought up more recently Strong emphasis on standardization and on use in very large systems Difficult to read for the human eye

KR Expressions Similar to S-expressions but easier to read Closer to the notation for logic formulas Contains some higher-level constructs that are found in some S-expression-based languages, but which are generally useful Used both in lecture notes/compendiums and in the software system being used (Leonardo)

KR Expressions Examples of use: color.red "Answer yes or no: " {busstop-4 busstop-7 busstop-12} (union {a b}{a c d}) [subset {a b} {c a d b g}] [knows-what peter (phone-number-of: lars)] [walk peter :from (home-of peter) :to Lkp-C]

KR Expressions Constructs: Entity color.red String "Answer yes or no: " Number 421 Composite entity (phone-number-of: lars) Set {busstop-4 busstop-7 busstop-12} Sequence Mapping {[: rose red][: waterlily white]} Form (union {a b}{a c d}) (+ 14.offset) use of variable Record [subset {a b} {c a d b g}] [walk peter :from (home-of peter) :to Lkp- C]

KR Expressions, extensions Constructs: Entity color.red String "Answer yes or no: " Number 421 Composite entity (phone-number-of: lars) Set {busstop-4 busstop-7 busstop-12} Sequence Mapping {[: rose red][: waterlily white]} Form ({a b} union {a c d}) (14 +.offset) use of variable Record [{a b} subset {c a d b g}] [peter walk :from (home-of peter) :to Lkp- C]

Common Expression Language (CEL) CEL is one of the languages using KRE style. It can be used in command-line dialog with a system, and in files in a knowledgebase Each construct in CEL is written using one of the constructs in KRE Literals (atomic propositions) as records [...] Actions as records [...] Composite propositions (using and, or, etc) as forms (...) Terms, i.e. arguments for actions and atomic propositions, are written as forms (...) The operator in an action record is called a verb The operator in a literal record is called a predicate

Common Expression Language (CEL) Literal [subset {b} {a b c}] [-subset {d} {a b c}] Proposition (or [equal a b][equal a c]) (not [equal a b]) Literals are also propositions Action [peter walk :from (home-of peter) :to Lkp-C] Term (home-of peter) (union {a b}{b c}]

Simple Session Example 1

The Autonomous Intelligent Agent Much of the software technology for A.I. systems centers around the concept of an autonomous intelligent agent. This is a software platform with good capabilities for the following: Representing a world model based on 'entities' and their relationships Representing the components of e.g. the BDI model or the HTN model as data so that they can be modified dynamically Contain the various algorithms etc that are need for aspects of the behavior Persist over time, e.g. so that learned behavior can be kept Communicate with other agents Interface to specialized software, e.g. sensors and actuators

In this course: Leonardo Platform Allegro CommonLisp agent indivma p individual Session with the agent leohost Other individual and agent

Manifestations, etc The individual has a persistent manifestation as a directory structure with files, and a dynamic manifestation as a run in a computer. These are kept consistent during the run. The persistent manifestation is expected to be long-lived (months, years) and to accumulate information over time. One indidivual can contain several agents. An individual (and an agent) can move between hosts. Agents can exchange messages. The indivmap structure contains location and addressing information. The leohost structure contains information about the current host, for use by visiting agents/individuals.

Structure of Leonardo system for this course Allegro CommonLisp remus orange lablib indivma p

Leonardo Platform and Registrar Allegro CommonLisp remus orange lablib indivma p Allegro CommonLisp remus registrar indivma p

Registration and Lab Routine The first time you use your agent it will prompt you for your name, student id, some more. Asap you should register your agent, i.e. give a command where it sends a registration message to the registrar. At this time your computer must be connected to the Internet. Lab assignments are downloaded from registrar to your Leonardo agent, using a download command. You do the work for the labs using your agent. The results of your work are put in a particular results file for each of the labs. To report your work, you issue a command whereby your agent sends the results file to the registrar. In some of the labs there is a command that you can use for checking your results file before sending it. We check the results file manually and/or automatically and send back a confirmation message by .

Structure of Leonardo system after registration Allegro CommonLisp remus orange lablib indivma p yourname

Simple Session Example 2

Leonardo platform in virtual host Allegro CommonLisp remus orange lablib indivma p ubuntu linux

Available Operational Modes Use Leonardo system in virtual host from VMware on your own computer. Recommended if you have one, you are comfortable with it, and it is sufficiently powerful. Available for Windows and Linux systems (not Mac). Use Leonardo system on IDA's student computer network. Recommended if you do not have a computer that you wish to use for this purpose. Use Leonardo system on your own computer without virtual host. Avoids the overhead of the virtual host, but requires you to install Allegro yourself, and minor problems may arise. Available for Windows, Linux and Mac systems. Note: You will be using an evaluation license for the Lisp system that expires on March 15, Technical information will be given in the tutorial session on Thursday (tomorrow).