Index - Agent Architecture (AA)

July 09, 2006

Agent Memory

JENA looks fantastic for RDF i/o. There also appears to be an add-on to JADE called AgentOWL that somehow hooks JADE and RDF models together.

Before I can start using this architecture to store my agents' episodic memory, I'd like to further define the infastructure for memory management. I can't seriously just dump everything into a big text file.

I love how Soar has facilities for 3 kinds of memory:
- procedural
- semantic
- episodic
See the Gentle Introduction to Soar for more. The agents in my own system will have similar sorts of memories. In addition to each agent having an agent-memory model, the HumanLearner agents will have an AIEd Student Model. To re-word it: The agents representing students will have 2 kinds of memory representation. One, to model the human student (ex. show their current understanding about a concept), and, two, to model the agent itself (ex. remember interactions with other agents).

I see that Soar seems to have some kind of Java API... would it be possible for me to use JADE for my agent framework and JENA for my memory management but yet somehow use the amazing powers of Soar's memory representation for each of my agents? It almost looks like Soar has its own agent framework and memory management so I don't know yet how to deal with this overlap.

Time to read more papers about multi-agent systems and secondary storage.

Posted by Frozone Permalink on July 09, 2006 02:57 PM | Comments (2)
categorized under Agent Architecture (AA)

This entry was written under the moon phase that looks like this:



June 27, 2006

Summoning pet agents

In my next iteration:

+++ Created: ( agent-identifier :name Crookshanks@Stephanie-iMac-2.local:1099/JADE )
Hello World! My name is Hermione
- Ron, receiving message: <- Pssst! I sell seashells at $10/kg
- Hermione, receiving reply: <- Hey. Can I borrow your notes?
Hello World! My name is Hermione
- Crookshanks received: Ron is lazy, isn't he, 'Shanks?
- Ron, receiving message: <- Pssst! I sell seashells at $10/kg
Hello World! My name is Hermione
- Hermione, receiving reply: <- Hey. Can I borrow your notes?
- Ron, receiving message: <- Pssst! I sell seashells at $10/kg
Hello World! My name is Hermione
- Hermione, receiving reply: <- Hey. Can I borrow your notes?
- Crookshanks received: Ron is lazy, isn't he, 'Shanks?
- Ron, receiving message: <- Pssst! I sell seashells at $10/kg
Hello World! My name is Hermione
- Hermione, receiving reply: <- Meow!
- Crookshanks received: Ron is lazy, isn't he, 'Shanks?
Hermione: Yes, let's get out of here, Crookshanks, and let Ron do his OWN homework.
- Ron, receiving message: <- Pssst! I sell seashells at $10/kg
I solemnly swear that I am up to no good!
Hello, this is the Marauder's map. 0: df@Stephanie-iMac-2.local:1099/JADE
Hello, this is the Marauder's map. 1: ams@Stephanie-iMac-2.local:1099/JADE
Hello, this is the Marauder's map. 2: Crookshanks@Stephanie-iMac-2.local:1099/JADE
Hello, this is the Marauder's map. *** 3: marauder@Stephanie-iMac-2.local:1099/JADE
Hello, this is the Marauder's map. 4: Ron@Stephanie-iMac-2.local:1099/JADE
Hello, this is the Marauder's map. 5: Hermione@Stephanie-iMac-2.local:1099/JADE
Hello, this is the Marauder's map. 6: RMA@Stephanie-iMac-2.local:1099/JADE

Here, the first thing Hermione does is summon her pet cat, CrookshanksAgent. Note that I did -not- invoke the Crookshanks agent from the command line, rather, the agent object is created only because Hermione summoned him.

Hermione continues her behaviour of announcing her presence to the world and whispering, "Psst! I sell seachells at $10/kg" to Ron. If her cat meows at her, she'll leave the room.

Ron continues his behaviour of doing nothing except responding "Hey. Can I borrow your notes?" to anyone who talks to him.

If Hermione receives a message from Ron in particular, she says to her CrookshanksAgent, "Ron is lazy, isn't he, 'Shanks?".

The behaviour of CrookshanksAgent is similar to Ron; he does nothing except reply "Meow!" to anyone who talks to him. This causes Hermione to quit and leave the room if she talks to her cat.

An optimization to this code may be to base Ron and Crookshanks on the same Agent class, eg. SimpleReplyAgent and simply set their reply message to suit the individual instance of that agent-type. But I'm just learning, so, whatever. lol.

Finally, there is also a Marauder's Map. I've started this agent on the command line. It simply prints "I solemnly swear that I am up to no good!" and then reveals every single agent in the vicinity. (Though I suppose that if I were true to Harry Potter, this message should be received by the Map from another agent and would only print the people in the room if the phrase is correct.)

Here's the code.

(Edit: I used to have the most adorable image here of Hermione, Ron & Crookshanks, but then I took it down because I was scared about copyright stuff. --Frozo)

Posted by Frozone Permalink on June 27, 2006 01:49 PM | Comments (0)
categorized under Agent Architecture (AA)

This entry was written under the moon phase that looks like this:



Two live agents implemented

Yay! I've coded up an agent envrionment where there exist 2 agents, Ron & Hermione. I've written a different behaviour into each agent, so, Hermione is of type "HelloWorldAgent" and Ron is of type "FriendAgent". Here's what happens when I let them go:

Jun 27, 2006 8:57:34 AM jade.core.Runtime beginContainer
INFO: ----------------------------------
This is JADE3.4 - revision 5874 of 2006/03/09 14:13:11
downloaded in Open Source, under LGPL restrictions,
at http://jade.tilab.com/
----------------------------------------
...
--------------------------------------------
Hello World! My name is Hermione
- Ron, receiving message: <- Pssst! I sell seashells at $10/kg
Hello World! My name is Hermione
- Hermione, receiving reply: <- Hey. Can I borrow your notes?
- Ron, receiving message: <- Pssst! I sell seashells at $10/kg
Hermione: Nope; I'm selling seashells. Bye!


...Basically, Hermione's behaviour is to announce her presence to the world and advertise her sale of seashells (from the example I was working from). She will repeat this process until the agent named "Ron" replies. Ron's behaviour is to do nothing unless someone talks to him. When someone does, no matter what they say to him, he replies with "Hey. Can I borrow your notes?".

Hermione is pre-programmed to terminate whenever anyone answers her by saying "Nope; I'm selling seashells. Bye." Eventually I'll program her to react according to what Ron says -- maybe he'll actually make an offer to buy shells!

Anyway, I just wanted to blog this snapshot of my code, since it's skeletal enough to be useful for core reference later. Here's Hermione's type -- HelloWorldAgent.java, and Ron's type -- FriendAgent.java.

To get the whole thing running in Eclipse (and boy, is this IDE worth the trouble!):

  1. Download jade.jar and jadeTools.jar from the JADE website.
  2. In Eclipse, go to Project --> Properties, then go to 'Java Build Path' and choose the 'Libraries' tab.Click button 'Add External JARs' and navigate to each of jade.jar and jadeTools.jar to add 'em.
  3. Next, in Eclipse still - go to Run --> Run... (or hit the green arrow button), then under 'JavaApplication' choose the application you're working on. If you don't have one, right-click on 'Java Application' and choose 'New' to make one. Next, click on the application name, then, go to the 'Main' tab. Under 'Main class:', type:

    jade.Boot

  4. Next, under 'Program arguments:', type:

    -gui Ron:steph.agents.experiments.FriendAgent Hermione:steph.agents.experiments.HelloWorldAgent

  5. That's all! Now you can click "Run" to watch the action.

In addition to reading the command-line output, you'll get a window kinda like this (below) to monitor your agents. I like to be able to go to File--> Shut Down Agent Platform in order to terminate the agent environment. Before I was using the gui, I had to do a control+c to quit it.

Very cool. Now I hafta go grocery shopping before the air conditioner repair man gets here. Bye!

Posted by Frozone Permalink on June 27, 2006 09:00 AM | Comments (2)
categorized under Agent Architecture (AA)

This entry was written under the moon phase that looks like this:



June 24, 2006

Communication channels in an Environment between agents

How do Agents communicate with each other within an Environment?

Here, my lack of education in AI hits me again - I don't know how this is usually done. So, in my own sketch, I simply created a list of different kinds of communication that I thought my agents would need. I called each kind of communication a "Channel" and grouped them all together in a "CommunicationsChannels" object. Thus, each Community would have one set of communication channels, kinda like this - another snippet of my big UML diagram: (update, "Ohhh, I see - in JADE lingo what I called 'channels' appear to be called 'directory facilities'.")

First, any agent will need to be able to send a message to any other individiual agent. (Individual-to-Individual)

Second, an agent may need to send a message to their entire community; this may be sub-divided into different channels for group notifications for different purposes. (Individual-to-community)

Thirdly, and this is really a sub-set of the first kind - other agents will want to be able to access the curent agent's own memory, which is comprised of a set of RDF statements. This is for querying other agents for specific information about their history or interactions with things. (Individual-to-Individual)

Fourthly, an individual agent will want to query the community's set of learning objects using data mining techniques. Like #2, this is an Individual-to-community message, only here the recepients are all LearningOBject-agents, while in #2, the recepients are all Human-agents.

Fifthly, (is that a word? lol) one agent may want to "introduce" one agent to another agent. Perhaps you're introducing 2 friends (showing a human-agent a human-agent) or perhaps you're showing a friend a good learning resource (showing a human-agent a LearningObject-agent.) The humanAgent would then mark any interactions with this object using RDF statements in their memory, which can then be accessed by their personal InstructionalPlan. This one is also just another form of #1, (Individual-to-Individual).

Now I'm going to go see if I can find any information about how real AI does this.

... ok I'm back. 'Very awesome tutorial from the Université de Montréal (I was born in Montreal, yay!) about how JADE agents communicate with each other. I will hammer out the details when I'm ready to start programming. I pray that this excellent tutorial will remain available for another 6 months or so or however far in the future I will need it.... but it's been there for 3 years now, so I think I'm safe.

The next logical thing to tackle would be to explore how to USE these communication functions to support, say, a teacher-agent to student-agent communication. However, I don't think I know enough about computational models of pedagogy to be able to do anything here. So I think next time I'll start looking into independent learning first - i.e. using this framework for an independent study sesssion. Then maybe I can start with very simple questions to the community like, "Does anyone have a learning object related to Concept X in our curriculum?"

Anyway I'll probably do that on Tuesday. For now I've decided to go and make some cornbread muffins.

Posted by Frozone Permalink on June 24, 2006 09:48 AM | Comments (0)
categorized under Agent Architecture (AA)

This entry was written under the moon phase that looks like this:



June 21, 2006

Agent Environment as registry of Communities & Agents

This morning I studied my design-so-far and noted that I needed to further elaborate on the student-agent and object-agent interaction. This led me to consider the Envirnoment in which the agents interact. I sketched out the following: (using Visual Paradigm for UML, Community Edition)

('If you will excuse my crude use of the case tool at these early design stages.)

The AgentEnvironment is supposed to model the environment under which all the agents interact with each other. I'll have to check to see how JADE models the environment. I hesitated to add a lot of design components (objects, methods, etc.) to the environment because I didn't want to put too much system dependence on any non-agent object, for fear of blurring the existing "Agent-Only" framework I hold in my head for all WWW domain knowledge representation. But then, I recalled that there are research labs exploring the improved performance of AI systems as richness is added to the Environment. (Unfortunately I've lost the reference to that research lab. They had photos and everything of their robotics and the various ways that they'd augmented the environment that the robots were running in.)

Fears aside, then, I granted that an AgentEnvironment should at least have a registered set of all Agents running under it, and I further chose to break the agents into two lists -- human agents and Learning Object agents.

I thought that perhaps an AgentEnvironment could roughly correspond to 1 host/servlet/tomcatEngine/jvm/meh in a Peer-to-Peer environment. Thus, you'd have a master list on any given node about all the agents hosted here at any given time. Note that these lists record only "Currently Logged In" or "Available" Agents - any permanent community memberships would be recorded by the communities themselves. Additionally, each AgentEnvironment (host) would also have a list of the EducationalCommunities that consider the current server their home. This would allow any individual on the P2P network to start and host their own community. There may also be a need to transfer a community between AgentEnvironments (ex. serialize the whole thing and send it to a different server for hosing that community.)

At this point I dug up one of my favourite papers by my CMPT 400 supervisor, Dr. Gord McCalla: The Fragmentation of Culture, Learning, Teaching and Technology: Implications for the Artificial Intelligence in Education Research Agenda in 2010. This paper gives a much more detailed discussion of the interaction of such communities.

Here's where I reached what I really wanted to tackle today: How will new LearningObjectAgents be introduced to a community? My solution of the day was to allow an Educational Environment to have a list of community learning object agents. Here I worried that was granting my Environment too many Agent attributes to the point that my Environment was merely becoming another Agent. I think I'm safe, though... I mean, an Environment has to have hooks with which agents can interact with, right? It's like instead of having a bunch of robots in a huge ring, I'm adding walls and sand traps and so on for the agents to navigate around. The whole point is not to have bare agents that only have to navigate around each other, but rather to have an environment in which they can "do their thing". (Oh dear, I need coffee. I'm being vague again.)

The final 2 boxes - Community Structure and TraditionalCommunityStructure are simply for the inevitable human need to add government to a society. Models may evenutally built for democratic-, marxist-, fascistic-style communties. For my purposes, I invented a simple community type, which I named "Traditional", where there are 2 members of the community marked with special roles. One, there's the "Figurehead" humanAgent, who would be something like:
- the head Teacher in a classroom-community
- the Principal of a school-community
- the Father of a 1900s Western family-style community
- the President of a commercial corporation-communtiy
- the Guild Leader of an MMORPG community
Secondly, the Denmother keeps the community together and running. New members can talk to her if they want to be officially added to the list of members/students. She can answer questions from strangers who have questions about the community, or she can direct them to the community member who is likely to be able to help them out. (Note, by default any EducationalCommunity would allow free-for-all registration, while such a Structure could sketch out an approval process for registration if this is what the community desired.)

Such Structures are not required in a community - the default would be a Utopian free-for-all, where all members are assumed equal. The structures are just added restrictions that can be subscribed to by a community that chooses to do so, ex. for an online classroom, you'll definitely want to add some restrictions on the kids and give some controlling powers to the teacher, depending on the age of the children being taught, of course.

Next, I think I'm interested in exploring some visualizations -- for example, what would a student see when they are sitting in their Educational Community classroom? How do they access their various communication channels, how can they tell who else is online, how can they view their progress through the curriculum, how do they see their short-term goal status vs. the long-term plans, how do they navigate their view from community to community, etc..?

Not to mention that I had probably ought to blog the rest of my (very large) UML diagram, but the 4 boxes shown here will do for now I suppose.

Posted by Frozone Permalink on June 21, 2006 12:09 PM | Comments (0)
categorized under Agent Architecture (AA)

This entry was written under the moon phase that looks like this:



June 10, 2006

Anatomy of an agent

With JADE, creating an agent appears to be as easy as:

public class LearningObjectAgent extends jade.core.Agent {
...
}

I still don't know how it works, exactly, but I'll deal with the details later. For now, I'm interested in making a list of what the guts of my agent should include: (Words in bold come from the Agent-Environment digagram in the textbook, Artificial Intelligence: A Modern Approach) Also another very good diagram on Wikipedia (perhaps inspired by this textbook??).

  • String uri; - to give each agent a unique ID, use the URI
  • Environment == Other Agents (Ideally, a jumble of both learning-object agents andhuman-learner agents)
  • Precepts: Facilities to receive messages from
    • other individual agents
    • perhaps over channels of groups of agents, ex. all students in an online classroom, but not the teacher, or, to the whole class, including the teacher, or, to the whole school/university, etc.
  • Actions
    • ability to send messages to other agents (individually or to a community)
  • The question mark (Internal Magic)
    • RDF file(s) for storage
      • interactions
        • with human agents
        • with learning object agents
      • if this is a learning object agent, where the object being represented fits into a particular ontology
    • out of this storage and also to retrieve help requests, or even teacher assigned work, from the communication channels. Some types of communication (such as assignments from the teacher) may need to be "imposed" rather than "found". Perhaps these can simply take the form of a learning object which is simply an RSS feed of assignments from the teacher.
    • Constraint analyses on which goals to pursue (ex. intrinsic or extrinsic, as in [Veassileva et al. 1999]) How would the goals themselves be stored?
    • Plan Generator (as in Determining the Focus of Instruction: Content Planning for Intelligent Tutoring Systems by Barbara Brecht, 1990) Would a human learner's agent be the source of thinking behind the parsing of an individual's content plan? I'm thinking probably yes... But now in addition to parsing RDF files, you're also parsing a content plan. This AI environment is getting rather complex.
  • Sensors to turn "Precepts/Facilities to communicate" into "Actions" so that changes in the environment can cause the agent to react. (also from [Veassileva et al. 1999])
    • ability to sense the RDF storage of other agents (data mining facilities to retrieve historic information)
  • Actuators/Effectors
    • ability to use data mining techniques on internal storage; query other agents' RDF storage to find histories of how similar agents queried with that agent in the past, and to examine the results of that interaction to determine if that learning object is right for "me" (i.e. current agent) at this time

The list above will evolve as I continue reading various papers about the topic and revise my own understanding.

Posted by Frozone Permalink on June 10, 2006 09:01 AM | Comments (0)
categorized under Agent Architecture (AA)

This entry was written under the moon phase that looks like this:



June 09, 2006

JADE - Java Agent DEvelopment Framework

Hmm, JADE looks promising.

In fact, there are a whole pile of different ideas on Wikipedia's Multi-agent system article, under the heading 'Multi-agent system development tools'.

Posted by Frozone Permalink on June 09, 2006 03:56 PM | Comments (1)
categorized under Agent Architecture (AA)

This entry was written under the moon phase that looks like this:



Index to Steph's Notes

Feb. 24th 2007 - Weee! This new part of my website is not an entry, but rather a permanent fixture whose purpose is to "Look Down on All Those Notes With Some Grand Vision of Organization". Wish me luck. LOL
  1. Representing meta-data (fuel) & the different kinds of "hooks" that intelligent systems can use (how fuel is injected into the motor of the engine)
    1. Motivation: Semantic net / Rationalizable to a machine
      1. Semantic network
      2. Genetic graph
      3. Prerequisite AND/OR graph
      4. Constraint Satisfaction Problems
      5. Bayesian networks / causal graphs
    2. Technology & Philosophy: RDF, modus ponens,
      1. Predicates, Logic & situation calculus
        1. When in doubt, do some math
    3. What kinds of data? - What kinds of meta-data would an AIEd system possibly need, and how is it represented?
      1. task domain knowledge
      2. "is-prerequisite-to"-type knowledge
        1. Jackpot! A pedagogical ontology
      3. interactions with learning objects & other learners - (location, composition is-a/part-of, sequencing by restricting navigation, personalization, ontologies for LO context)
        1. Types of 'Ecological' data
      4. lesson plans, curriculum plans, practicing sessions (What is stored, what is generated on the fly? What is remembered?)
        1. Agent memory
    4. How to organize it - When is it stored in a database? Meta-data? Agent memory banks? Protocols? Repositories? XML files? Home-servers? WSDL services? Frameworks? Portable banks? P2P access?
      1. Database of object-agent interactions
      2. Concept of "Home" on a P2P network -- maybe the bulk of a learning object's usage data is on its home server and can be queried using WSDL or something ? Similar homes for each student's usage history, etc. Baggage problem.
    5. Links to the ontologies
      1. referring to a concept/relationship - ex. AgentOwl?
        1. Using Vocabularies in JENA
        2. Referring to a concept/relationship in an ontology
        3. Improved: Referring to a concept/relationship in an ontology
        4. Using OWL to reference constraints in tutoring systems
    6. Generation of this data
      1. Rationalization: For use by other AIEd systems
      2. What is generated - discuss items under part I.C.
      3. When it's generated - describe procedural model, which parts of the engine generate what (isa-part-of data, XML feeds, web services, meta data bout groups and collaboration, protocols, examples Friend of A Friend FOAF project)
        1. Thinking about the system's RDF output
      4. Technical notes of HOW it's generated: JENA, issues of implementation demo, my Hermione & Ron agent examples, lol
      5. Usage of this generated data - see part IV. A.
  2. Given the engine, who uses it?
    1. Students / Learners / "Me"
      1. instructional planning, student model, pre-requisites, tutoring, coaching, collaboration,constructivism
    2. Teachers / Educators / "Me"
      1. putting together lessons
      2. be able to browse through task domain knowledge in an objective / encyclopaedia format, then be able to pick-and-choose what you need for your students
      3. compose examples, design explanations, pull together diagrams, learning objects, etc. Haystack Relo?
    3. Administration / Governement / Structure / Crowd Control
      1. as restrictions/obstacles/sand pit to the robot in agent environment
      2. can't just have a swarm of students and teachers out there -- need structure of courses, curriculum, objectives, requirements (at least, we do in this day and age!) - Report cards, evaluation, feedback
      3. government, marks, certificates, requirements, funding, curriclum, attendance, delinquent, non-attending, motivation
      4. school''s images, goals, strengths, payroll, HR, security, accounts, permissions, privacy
      5. registration, failed courses
  3. User Environment -- How does this engine work? What does the user see on the screen?
    1. Introduction - Given a background in educational psychology, how does the system present itself -- what does the user see, and were does this data come from? Links to thoughts from part I.)
    2. Task Domain Browsing - Suppose you're you're just idly browsing through the "raw" content. How would it look when it's not wrapped around a learning-context or lesson or tutorial or anything. 'Cross between browsing a raw task domain ontology and browsing a learning object repository.
      1. Cleaning up the data -- Visualizing the data for humans to pick through the task domain and work on it. Suppose the "Subject Expert" discovers an advancement in science and needs to update the "world's" domain knowledge. (I used the "Subject Expert" terminology from Ontologies to Support Learning Design Context - Thanks Chris) How would they make corrections to ontologies and learning objects, or at least point the users of "old" objects towards adopting the newer ones.
      2. "Modes" - Learning & Lessons / Checklist - Homework, Assignments, Courses being taken / Collaborative mode / Teaching mode / Calendar- email -adminisrative mode -- See also the different kinds of scenarios in the ActiveMath system
        1. Educating myself about Education
  4. Evolution of this engine
    1. target some key implementation hooks discussed in part I - design an experiment/demo
      1. scrape a page - (Note, scraping can only give objective data, not in-context dat)
      2. LO repository - related to browsing the task domain?
      3. a learners "To Do" list - where does it come from? Assignments, courses.
      4. sample group scenario
      5. sample teacher lesson planning
      6. sample data "left behind"
      7. sample use of that data
    2. Data mining (for what? lol )
      1. discovery / generation of ontologies - when do you need to hunt for them, and when do you have to have a solidly-known & predictable ontology?
        1. Ontological Engineering: taking a first bite
    3. I/O - where it happens, which languages, protocols, which agents perform i/o and when, precepts, actuators
      1. Role Assignments
        1. Levels of authorization in web applications
      2. My Environment Adapts to me
        1. Displaying feedback from the server on JSP pages (Software engineering considerations)
        2. Sketching out a design (Content planning vs. Delivery planning)
      3. agent negotiations / social structures / ummm... Web 2.0 ?
        1. Towards student modelling
        2. Anatomy of an agent
    4. garbage collection of meta data
      1. Artificial Intelligence & Evolution
        1. Memory Culling: Necessary part of intelligence? (artificial or human)
        2. Applications for the Genetic/Evolutionary algorithm
      2. open learning environments
  5. Agents, pets, grouping, Community modelling
    1. Protocols - finding groups, cyber dollars, state diagrams (?)
    2. "Community Studies" - graphs & communication hubs, types of communities (free-for-all, hierarchy of authority, etc.)
    3. implications of joining a community - what do you share, which parts of your student model are relevant
    4. Walls & sand traps -- deliberate restrictions as problem-solving for learning
    5. Communication channels - individual-to-individual, individual-to-community, chat channels, agent-only "administrative" communications, ex. requests for related learning objects in a particular community, etc.
  6. Educational/Pedagogical focus (this part probably shouldn't be its own section but rather incorporated into the whole picture, but it's separate for me right now because I'm still only just starting to learn about it.)
    1. Semantics - what there is to talk about in Education
      1. ex. Merril's First Principles of Instruction, linking educational terms to AI terms
        1. Educating myself about education
    2. Pedagogical skills for tutors -- supporting human *and* artifical tutors
      1. Modelling teaching strategies
      2. What is teaching?
      3. Decision theory for teaching strategies
      4. My pedagogical issues
      5. Ontological comparisons as spatial relationships
    3. Student modelling - what the machine needs to know about the student, pedagogically-speaking, about learning history/preferences
    4. Roles - Simulated students, Coaches, Tutors, Teachers,