Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

aima-talk · AI: A Modern Approach: Help for the text

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 701 - 730 of 946   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#701 From: "amy_davis_86" <amy_davis_86@...>
Date: Wed Jul 19, 2006 1:25 pm
Subject: I need help!
amy_davis_86
Send Email Send Email
 
hi,
I have just finished my second year at university,and have  started
reading  the aima book,
  I wanted to know which excersises you think are more important to
practice(especially from the first few chapters)

much appreciated,
amy.

#702 From: "Maithreebhanu Wimalasekare" <bhanu128@...>
Date: Fri Jul 21, 2006 5:19 am
Subject: Re: I need help!
bhanu128
Send Email Send Email
 
--- In aima-talk@yahoogroups.com, "amy_davis_86" <amy_davis_86@...> wrote:
>
> hi,
> I have just finished my second year at university,and have  started
> reading  the aima book,
>  I wanted to know which excersises you think are more important to
> practice(especially from the first few chapters)
>
> much appreciated,
> amy.
>

it depends on the final year project/module u have chosen. i myself
found exec. regarding agents usefull.

#703 From: "ÁÕàÓöÙ" <kyxaxa@...>
Date: Thu Jul 27, 2006 12:36 am
Subject: how to run python's Graphical User Interface for Environments in agents.py
sergijka
Send Email Send Email
 
 
# GUI - Graphical User Interface for Environments
# If you do not have Tkinter installed, either get a new installation of Python
# (Tkinter is standard in all new releases), or delete the rest of this file
# and muddle through without a GUI.
 
I have python24.
But just "v = VacuumEnvironment(); w = EnvFrame(v);" do nothing - there is no Graphical User Interface for Environments.
What am I doing wrong and how to compel this piece of code to return a Graphical User Interface for Environments?
 
Thanks in advance for help.
"""Implement Agents and Environments (Chapters 1-2).

The class hierarchies are as follows:

Object ## A physical object that can exist in an environment
     Agent
         Wumpus
         RandomAgent
         ReflexVacuumAgent
         ...
     Dirt
     Wall
     ...

Environment ## An environment holds objects, runs simulations
     XYEnvironment
         VacuumEnvironment
         WumpusEnvironment

EnvFrame ## A graphical representation of the Environment

"""

from utils import *
import random, copy

#______________________________________________________________________________

class Object:
     """This represents any physical object that can appear in an Environment.
     You subclass Object to get the objects you want.  Each object can have a
     .__name__  slot (used for output only)."""
     def __repr__(self):
         return '<%s>' % getattr(self, '__name__', self.__class__.__name__)

     def is_alive(self):
         """Objects that are 'alive' should return true."""
         return hasattr(self, 'alive') and self.alive

     def display(self, canvas, x, y, width, height):
         """Display an image of this Object on the canvas."""
         pass

class Agent(Object):
     """An Agent is a subclass of Object with one required slot,
     .program, which should hold a function that takes one argument, the
     percept, and returns an action. (What counts as a percept or action
     will depend on the specific environment in which the agent exists.)
     Note that 'program' is a slot, not a method.  If it were a method,
     then the program could 'cheat' and look at aspects of the agent.
     It's not supposed to do that: the program can only look at the
     percepts.  An agent program that needs a model of the world (and of
     the agent itself) will have to build and maintain its own model.
     There is an optional slots, .performance, which is a number giving
     the performance measure of the agent in its environment."""

     def __init__(self):
         def program(percept):
             return raw_input('Percept=%s; action? ' % percept)
         self.program = program
         self.alive = True

def TraceAgent(agent):
     """Wrap the agent's program to print its input and output. This will let
     you see what the agent is doing in the environment."""
     old_program = agent.program
     def new_program(percept):
         action = old_program(percept)
         print '%s perceives %s and does %s' % (agent, percept, action)
         return action
     agent.program = new_program
     return agent

#______________________________________________________________________________

class TableDrivenAgent(Agent):
     """This agent selects an action based on the percept sequence.
     It is practical only for tiny domains.
     To customize it you provide a table to the constructor. [Fig. 2.7]"""

     def __init__(self, table):
         "Supply as table a dictionary of all {percept_sequence:action} pairs."
         ## The agent program could in principle be a function, but because
         ## it needs to store state, we make it a callable instance of a class.
         Agent.__init__(self)
         percepts = []
         def program(percept):
             percepts.append(percept)
             action = table.get(tuple(percepts))
             return action
         self.program = program


class RandomAgent(Agent):
     "An agent that chooses an action at random, ignoring all percepts."
     def __init__(self, actions):
         Agent.__init__(self)
         self.program = lambda percept: random.choice(actions)


#______________________________________________________________________________

loc_A, loc_B = (0, 0), (1, 0) # The two locations for the Vacuum world

class ReflexVacuumAgent(Agent):
     "A reflex agent for the two-state vacuum environment. [Fig. 2.8]"

     def __init__(self):
         Agent.__init__(self)
         def program((location, status)):
             if status == 'Dirty': return 'Suck'
             elif location == loc_A: return 'Right'
             elif location == loc_B: return 'Left'
         self.program = program


def RandomVacuumAgent():
     "Randomly choose one of the actions from the vaccum environment."
     return RandomAgent(['Right', 'Left', 'Suck', 'NoOp'])


def TableDrivenVacuumAgent():
     "[Fig. 2.3]"
     table = {((loc_A, 'Clean'),): 'Right',
              ((loc_A, 'Dirty'),): 'Suck',
              ((loc_B, 'Clean'),): 'Left',
              ((loc_B, 'Dirty'),): 'Suck',
              ((loc_A, 'Clean'), (loc_A, 'Clean')): 'Right',
              ((loc_A, 'Clean'), (loc_A, 'Dirty')): 'Suck',
              # ...
              ((loc_A, 'Clean'), (loc_A, 'Clean'), (loc_A, 'Clean')): 'Right',
              ((loc_A, 'Clean'), (loc_A, 'Clean'), (loc_A, 'Dirty')): 'Suck',
              # ...
              }
     return TableDrivenAgent(table)


class ModelBasedVacuumAgent(Agent):
     "An agent that keeps track of what locations are clean or dirty."
     def __init__(self):
         Agent.__init__(self)
         model = {loc_A: None, loc_B: None}
         def program((location, status)):
             "Same as ReflexVacuumAgent, except if everything is clean, do NoOp"
             model[location] = status ## Update the model here
             if model[loc_A] == model[loc_B] == 'Clean': return 'NoOp'
             elif status == 'Dirty': return 'Suck'
             elif location == loc_A: return 'Right'
             elif location == loc_B: return 'Left'
         self.program = program

#______________________________________________________________________________

class Environment:
     """Abstract class representing an Environment.  'Real' Environment classes
     inherit from this. Your Environment will typically need to implement:
         percept:           Define the percept that an agent sees.
         execute_action:    Define the effects of executing an action.
                            Also update the agent.performance slot.
     The environment keeps a list of .objects and .agents (which is a subset
     of .objects). Each agent has a .performance slot, initialized to 0.
     Each object has a .location slot, even though some environments may not
     need this."""

     def __init__(self,):
         self.objects = []; self.agents = []

     object_classes = [] ## List of classes that can go into environment

     def percept(self, agent):
	 "Return the percept that the agent sees at this point. Override this."
         abstract

     def execute_action(self, agent, action):
         "Change the world to reflect this action. Override this."
         abstract

     def default_location(self, object):
	 "Default location to place a new object with unspecified location."
         return None

     def exogenous_change(self):
	 "If there is spontaneous change in the world, override this."
	 pass

     def is_done(self):
         "By default, we're done when we can't find a live agent."
         for agent in self.agents:
             if agent.is_alive(): return False
         return True

     def step(self):
	 """Run the environment for one time step. If the
	 actions and exogenous changes are independent, this method will
	 do.  If there are interactions between them, you'll need to
	 override this method."""
	 if not self.is_done():
             actions = [agent.program(self.percept(agent))
                        for agent in self.agents]
             for (agent, action) in zip(self.agents, actions):
		 self.execute_action(agent, action)
             self.exogenous_change()

     def run(self, steps=1000):
	 """Run the Environment for given number of time steps."""
	 for step in range(steps):
             if self.is_done(): return
             self.step()

     def add_object(self, object, location=None):
	 """Add an object to the environment, setting its location. Also keep
	 track of objects that are agents.  Shouldn't need to override this."""
	 object.location = location or self.default_location(object)
	 self.objects.append(object)
	 if isinstance(object, Agent):
             object.performance = 0
             self.agents.append(object)
	 return self


class XYEnvironment(Environment):
     """This class is for environments on a 2D plane, with locations
     labelled by (x, y) points, either discrete or continuous.  Agents
     perceive objects within a radius.  Each agent in the environment
     has a .location slot which should be a location such as (0, 1),
     and a .holding slot, which should be a list of objects that are
     held """

     def __init__(self, width=10, height=10):
         update(self, objects=[], agents=[], width=width, height=height)

     def objects_at(self, location):
         "Return all objects exactly at a given location."
         return [obj for obj in self.objects if obj.location == location]

     def objects_near(self, location, radius):
         "Return all objects within radius of location."
         radius2 = radius * radius
         return [obj for obj in self.objects
                 if distance2(location, obj.location) <= radius2]

     def percept(self, agent):
         "By default, agent perceives objects within radius r."
         return [self.object_percept(obj, agent)
                 for obj in self.objects_near(agent)]

     def execute_action(self, agent, action):
         if action == 'TurnRight':
             agent.heading = turn_heading(agent.heading, -1)
         elif action == 'TurnLeft':
             agent.heading = turn_heading(agent.heading, +1)
         elif action == 'Forward':
             self.move_to(agent, vector_add(agent.heading, agent.location))
         elif action == 'Grab':
             objs = [obj for obj in self.objects_at(agent.location)
                     if obj.is_grabable(agent)]
             if objs:
                 agent.holding.append(objs[0])
         elif action == 'Release':
             if agent.holding:
                 agent.holding.pop()
         agent.bump = False

     def object_percept(self, obj, agent): #??? Should go to object?
         "Return the percept for this object."
         return obj.__class__.__name__

     def default_location(self, object):
         return (random.choice(self.width), random.choice(self.height))

     def move_to(object, destination):
         "Move an object to a new location."

     def add_object(self, object, location=(1, 1)):
         Environment.add_object(self, object, location)
         object.holding = []
         object.held = None
         self.objects.append(object)

     def add_walls(self):
         "Put walls around the entire perimeter of the grid."
         for x in range(self.width):
             self.add_object(Wall(), (x, 0))
             self.add_object(Wall(), (x, self.height-1))
         for y in range(self.height):
             self.add_object(Wall(), (0, y))
             self.add_object(Wall(), (self.width-1, y))

def turn_heading(self, heading, inc,
                  headings=[(1, 0), (0, 1), (-1, 0), (0, -1)]):
     "Return the heading to the left (inc=+1) or right (inc=-1) in headings."
     return headings[(headings.index(heading) + inc) % len(headings)]

#______________________________________________________________________________
## Vacuum environment

class TrivialVacuumEnvironment(Environment):
     """This environment has two locations, A and B. Each can be Dirty or Clean.
     The agent perceives its location and the location's status. This serves as
     an example of how to implement a simple Environment."""

     def __init__(self):
         Environment.__init__(self)
         self.status = {loc_A:random.choice(['Clean', 'Dirty']),
                        loc_B:random.choice(['Clean', 'Dirty'])}

     def percept(self, agent):
         "Returns the agent's location, and the location status (Dirty/Clean)."
         return (agent.location, self.status[agent.location])

     def execute_action(self, agent, action):
         """Change agent's location and/or location's status; track performance.
         Score 10 for each dirt cleaned; -1 for each move."""
         if action == 'Right':
             agent.location = loc_B
             agent.performance -= 1
         elif action == 'Left':
             agent.location = loc_A
             agent.performance -= 1
         elif action == 'Suck':
             if self.status[agent.location] == 'Dirty':
                 agent.performance += 10
             self.status[agent.location] = 'Clean'

     def default_location(self, object):
         "Agents start in either location at random."
         return random.choice([loc_A, loc_B])

class Dirt(Object): pass
class Wall(Object): pass

class VacuumEnvironment(XYEnvironment):
     """The environment of [Ex. 2.12]. Agent perceives dirty or clean,
     and bump (into obstacle) or not; 2D discrete world of unknown size;
     performance measure is 100 for each dirt cleaned, and -1 for
     each turn taken."""
     def __init__(self, width=10, height=10):
         XYEnvironment.__init__(self, width, height)
         self.add_walls()

     object_classes = [Wall, Dirt, ReflexVacuumAgent, RandomVacuumAgent,
                       TableDrivenVacuumAgent, ModelBasedVacuumAgent]

     def percept(self, agent):
         """The percept is a tuple of ('Dirty' or 'Clean', 'Bump' or 'None').
         Unlike the TrivialVacuumEnvironment, location is NOT perceived."""
         status =  if_(self.find_at(Dirt, agent.location), 'Dirty', 'Clean')
         bump = if_(agent.bump, 'Bump', 'None')
         return (status, bump)

     def execute_action(self, agent, action):
         if action == 'Suck':
             if self.find_at(Dirt, agent.location):
                 agent.performance += 100
         agent.performance -= 1
         XYEnvironment.execute_action(self, agent, action)

#______________________________________________________________________________

class SimpleReflexAgent(Agent):
     """This agent takes action based solely on the percept. [Fig. 2.13]"""

     def __init__(self, rules, interpret_input):
         Agent.__init__(self)
         def program(percept):
             state = interpret_input(percept)
             rule = rule_match(state, rules)
             action = rule.action
             return action
         self.program = program

class ReflexAgentWithState(Agent):
     """This agent takes action based on the percept and state. [Fig. 2.16]"""

     def __init__(self, rules, udpate_state):
         Agent.__init__(self)
         state, action = None, None
         def program(percept):
             state = update_state(state, action, percept)
             rule = rule_match(state, rules)
             action = rule.action
             return action
         self.program = program

#______________________________________________________________________________
## The Wumpus World

class Gold(Object): pass
class Pit(Object): pass
class Arrow(Object): pass
class Wumpus(Agent): pass
class Explorer(Agent): pass

class WumpusEnvironment(XYEnvironment):
     object_classes = [Wall, Gold, Pit, Arrow, Wumpus, Explorer]
     def __init__(self, width=10, height=10):
         XYEnvironment.__init__(self, width, height)
         self.add_walls()
     ## Needs a lot of work ...


#______________________________________________________________________________

def compare_agents(EnvFactory, AgentFactories, n=10, steps=1000):
     """See how well each of several agents do in n instances of an environment.
     Pass in a factory (constructor) for environments, and several for agents.
     Create n instances of the environment, and run each agent in copies of
     each one for steps. Return a list of (agent, average-score) tuples."""
     envs = [EnvFactory() for i in range(n)]
     return [(A, test_agent(A, steps, copy.deepcopy(envs)))
             for A in AgentFactories]

def test_agent(AgentFactory, steps, envs):
     "Return the mean score of running an agent in each of the envs, for steps"
     total = 0
     for env in envs:
         agent = AgentFactory()
         env.add_object(agent)
         env.run(steps)
         total += agent.performance
     return float(total)/len(envs)

#______________________________________________________________________________

_docex = """
a = ReflexVacuumAgent()
a.program
a.program((loc_A, 'Clean')) ==> 'Right'
a.program((loc_B, 'Clean')) ==> 'Left'
a.program((loc_A, 'Dirty')) ==> 'Suck'
a.program((loc_A, 'Dirty')) ==> 'Suck'

e = TrivialVacuumEnvironment()
e.add_object(TraceAgent(ModelBasedVacuumAgent()))
e.run(5)

## Environments, and some agents, are randomized, so the best we can
## give is a range of expected scores.  If this test fails, it does
## not necessarily mean something is wrong.
envs = [TrivialVacuumEnvironment() for i in range(100)]
def testv(A): return test_agent(A, 4, copy.deepcopy(envs))
testv(ModelBasedVacuumAgent)
(7 < _ < 11) ==> True
testv(ReflexVacuumAgent)
(5 < _ < 9) ==> True
testv(TableDrivenVacuumAgent)
(2 < _ < 6) ==> True
testv(RandomVacuumAgent)
(0.5 < _ < 3) ==> True
"""

#______________________________________________________________________________
# GUI - Graphical User Interface for Environments
# If you do not have Tkinter installed, either get a new installation of Python
# (Tkinter is standard in all new releases), or delete the rest of this file
# and muddle through without a GUI.

'''
import Tkinter as tk

class EnvFrame(tk.Frame):
     def __init__(self, env, title='AIMA GUI', cellwidth=50, n=10):
         update(self, cellwidth = cellwidth, running=False, delay=1.0)
         self.n = n
         self.running = 0
         self.delay = 1.0
         self.env = env
         tk.Frame.__init__(self, None, width=(cellwidth+2)*n,
height=(cellwidth+2)*n)
         #self.title(title)
         # Toolbar
         toolbar = tk.Frame(self, relief='raised', bd=2)
         toolbar.pack(side='top', fill='x')
         for txt, cmd in [('Step >', self.env.step), ('Run >>', self.run),
                          ('Stop [ ]', self.stop)]:
             tk.Button(toolbar, text=txt, command=cmd).pack(side='left')
         tk.Label(toolbar, text='Delay').pack(side='left')
         scale = tk.Scale(toolbar, orient='h', from_=0.0, to=10, resolution=0.5,
                          command=lambda d: setattr(self, 'delay', d))
         scale.set(self.delay)
         scale.pack(side='left')
         # Canvas for drawing on
         self.canvas = tk.Canvas(self, width=(cellwidth+1)*n,
                                 height=(cellwidth+1)*n, background="white")
         self.canvas.bind('<Button-1>', self.left) ## What should this do?
         self.canvas.bind('<Button-2>', self.edit_objects)
         self.canvas.bind('<Button-3>', self.add_object)
         if cellwidth:
             c = self.canvas
             for i in range(1, n+1):
                 c.create_line(0, i*cellwidth, n*cellwidth, i*cellwidth)
                 c.create_line(i*cellwidth, 0, i*cellwidth, n*cellwidth)
                 c.pack(expand=1, fill='both')
         self.pack()


     def background_run(self):
         if self.running:
             self.env.step()
             ms = int(1000 * max(float(self.delay), 0.5))
             self.after(ms, self.background_run)

     def run(self):
         print 'run'
         self.running = 1
         self.background_run()

     def stop(self):
         print 'stop'
         self.running = 0

     def left(self, event):
         print 'left at ', event.x/50, event.y/50

     def edit_objects(self, event):
         """Choose an object within radius and edit its fields."""
         pass

     def add_object(self, event):
         ## This is supposed to pop up a menu of Object classes; you choose the
one
         ## You want to put in this square.  Not working yet.
         menu = tk.Menu(self, title='Edit (%d, %d)' % (event.x/50, event.y/50))
         for (txt, cmd) in [('Wumpus', self.run), ('Pit', self.run)]:
             menu.add_command(label=txt, command=cmd)
         menu.tk_popup(event.x + self.winfo_rootx(),
                       event.y + self.winfo_rooty())

         #image=PhotoImage(file=r"C:\Documents and
Settings\pnorvig\Desktop\wumpus.gif")
         #self.images = []
         #self.images.append(image)
         #c.create_image(200,200,anchor=NW,image=image)

#v = VacuumEnvironment(); w = EnvFrame(v);
'''

#704 From: "sergijka" <kyxaxa@...>
Date: Fri Jul 28, 2006 11:36 am
Subject: Re: how to run python's Graphical User Interface for Environments in agents.py
sergijka
Send Email Send Email
 
--- In aima-talk@yahoogroups.com, "ÁÕàÓöÙ" <kyxaxa@...> wrote:
>
> It is said in the http://aima.cs.berkeley.edu/python/agents.html:
>
> # GUI - Graphical User Interface for Environments
> # If you do not have Tkinter installed, either get a new
installation of
> Python
> # (Tkinter is standard in all new releases), or delete the rest of
this file
> # and muddle through without a GUI.
>
> I have python24.
> But just "*v = VacuumEnvironment(); w = EnvFrame(v);*" do nothing -
there is
> no Graphical User Interface for Environments.
> What am I doing wrong and how to compel this piece of code to
return a
> Graphical
> User Interface for Environments?
>
> Thanks in advance for help.


Well, the code

"
v = VacuumEnvironment()
w = EnvFrame(v)
w.mainloop()
"

draw the grid (for us this is environment for agent) where the agent
will live.

But how to compel different agents to live in this environment?...

#705 From: "ragusa2001" <ragusa2001@...>
Date: Thu Aug 3, 2006 7:23 pm
Subject: How users search and how they “discover” their own keywords
ragusa2001
Send Email Send Email
 
Users query Search Engines databases by words. They are enabled to
query by sequence of words and/or by combining them logically in a
sort of "Logical Hook". Some successful chains become "keywords" for
users. That's very important: actual search engines do not offer
searching by "keywords", they ignore them. From time to time some
"tracking" services offer the most frequent keywords, single words or
combination of words most frequently used. Darwin strategy is focused
in discovering them, assign them to specific subjects of the Human
Knowledge and accordingly offer them to users. In the future, it will
be also advisable to index pages and even Web sites by these keywords....

more in: http://www.intag.org/blog/

#706 From: "Ivan F. Villanueva B." <ivan@...>
Date: Sun Aug 13, 2006 2:09 pm
Subject: POLICY-ITERATION (chapter 17)
artificialidea
Send Email Send Email
 
Hello mates,
I've been testing my java code for the algorithm POLICY-ITERATION (chapter 17).
It solves the Simplified Bellman Equations (SBE) for the MDP example of the
book. However, because the first policy is a random one, there are situations
where the SBE are not solvable. I wonder if it is a known issue and if there is
an easy workaround for it. An example follows.

The discount is 1. The random first policy is:

{41=NORTH, 32=NORTH, 23=WEST, 21=NORTH, 12=NORTH, 31=SOUTH, 13=WEST, 33=EAST,
11=SOUTH}

Then the linear equations (Bellman Equations) in Matrix form are:

         4,1     3,2     2,3     2,1     1,2     3,1     1,3     3,3     1,1
     +
-------------------------------------------------------------------------------
     |
4,1 |   -9/10    0       0       0       0      1/10     0       0       0     
21/25
2,3 |   0        0     -4/5      0       0       0      4/5      0       0      
1/25
3,2 |   0      -9/10     0       0       0       0       0      4/5      0      
7/50
1,2 |   0        0       0       0     -4/5      0      4/5      0       0      
1/25
2,1 |   0        0       0     -1/5      0      1/10     0       0      1/10    
1/25
1,3 |   0        0       0       0      1/10     0     -1/10     0       0      
1/25
3,1 |   1/10     0       0      1/10     0     -1/5      0       0       0      
1/25
3,3 |   0       1/10     0       0       0       0       0     -9/10     0    
-19/25
1,1 |   0        0       0      1/10     0       0       0       0     -1/10    
1/25


The next code in Maxima (a free mathematical software) shows that the linear
system is not solvable (because the ranks are different):

-----------------  Maxima  --------------------------

a:matrix([-9/10,0,0,0,0,1/10,0,0,0], [0,0,-4/5,0,0,0,4/5,0,0],
[0,-9/10,0,0,0,0,0,4/5,0], [0,0,0,0,-4/5,0,4/5,0,0],
[0,0,0,-1/5,0,1/10,0,0,1/10], [0,0,0,0,1/10,0,-1/10,0,0],
[1/10,0,0,1/10,0,-1/5,0,0,0], [0,1/10,0,0,0,0,0,-9/10,0],
[0,0,0,1/10,0,0,0,0,-1/10]);

/* returns 8: */
rank(a);

b:[21/25,1/25,7/50,1/25,1/25,1/25,1/25,-19/25,1/25];

ae:addcol(a,b)$

/* returns 9: */
rank(ae);

-----------------------------------------------------

--
Ivan F. Villanueva B.
A.I. library:   http://www.artificialidea.com
<<<          The European Patent Litigation Agreement (EPLA)          >>>
<<<            will bring Software patents by the backdoor            >>>
<<<  http://www.no-lobbyists-as-such.com/florian-mueller-blog/epla/   >>>
<<<                     http://wiki.ffii.de/EplaEn                    >>>

#707 From: "andreteves85" <andre.teves@...>
Date: Thu Aug 24, 2006 7:53 pm
Subject: doubt in section 7.6
andreteves85
Send Email Send Email
 
Hi!

I was studying the section 7.6, about the DPLL and WalkSAT algorithms
and I had a doubt about how the random sentences used to plot the fig
7.18 were generated.Do anyone know what generator was used to do this?

Thanks a lot,
Andre Teves

#708 From: "Ivan F. Villanueva B." <ivan@...>
Date: Sat Sep 9, 2006 9:35 pm
Subject: QLearning
artificialidea
Send Email Send Email
 
Dear soul-mates,

I would like to comment some issues of the QLearning algorithm in the book.

(1)
First of all I think there is a mistake in the pseudo code: For the update of
Q[a,s], r' instead of r should be used. Otherwise the values of the final states
will never be taken into account.

(2)
If my point (1) is correct, then the static variable r is not needed in the
code.

(3)
Nsa should be initialized to 0 for all values.

(4)
max(a') should be randomly chosen if the are more than one maximum (between
them)

(5)
f(q,n) must return a value even when q is null, i.e. when the agent has no idea
of the value of Q(a', s')
In the book it works because f(q,n) returns 2 the first 5 iterations, regardless
of the value of Q(a', s') (explained in the page 774 of the International
Edition)

(6)
I have been playing with the QLearning algorithm (after the modification
described in (1)) and the simple MDP world example. I have checked it with two
different parameters sets. The one described in the book:
     - reward of non-terminal states: -0.02 [r]
     - applies the value 2 [rp] to actions done less than 5 [en] times
     - the learning rate [rl] is
         60 / (60 - 1) + iteration
       i.e. the parameter rl is here 60
     - the number of trials is 2000 [tn]
and the values:
     lr = 5 // learning rate
     en = 100 ; // exploration number
     rp = 2 ; // value of unknown states
     tn = 300 ; // number of trials
     r = -0.05

I have computed the q-values of the four actions in state 3,3 for each
iteration. With the first set (see attached graph1.png for the values of a
representative experiment), in most of the experiments, the values are wrong at
the end.
With the second set, the values are correct for all experiments I have performed
so far (see attached graph2.png for an example)

Regards,
--
Ivan F. Villanueva B.
A.I. library:   http://www.artificialidea.com
<<<          The European Patent Litigation Agreement (EPLA)          >>>
<<<            will bring Software patents by the backdoor            >>>
<<<  http://www.no-lobbyists-as-such.com/florian-mueller-blog/epla/   >>>
<<<                     http://wiki.ffii.de/EplaEn                    >>>

#709 From: "kbs_group10" <kbs_group10@...>
Date: Mon Sep 25, 2006 3:07 pm
Subject: can you help me please to answer this question !!
kbs_group10
Send Email Send Email
 
can you help me please to answer this question !!

How can Artificial Intelligence technology be used in decision
support ?

                                        Thank you

#710 From: ¤p¦|¤¤ªºªe¤ô <chrixc.tw@...>
Date: Sat Sep 30, 2006 5:33 am
Subject: Who know the answer of Computing Machinery and Intelligence
chrixc.tw
Send Email Send Email
 
Dear All,

Who know the answer for following question. It might change nowaday.

Read Turing¡¦s original paper on AI (Turing, 1950). In this paper,
he discusses several potential objections to his proposed enterprise
and his test for intelligence.
a. Which objections still carry some weight?

b. Are his refutations valid?

c. Can you think of new objections arising from developments since
he wrote the paper?

In the paper, he predicts that, by the year 2000, a computer will
have a 30% chance of passing a five-minute Turing Test with an
unskilled interrogator.
d. What change do you think a computer would have today?

Thanks

e. In another 50 years?

#711 From: "saarlodri1984" <brotsammler@...>
Date: Sat Oct 28, 2006 9:08 am
Subject: Model-based reflex agents and goal-based agents
saarlodri1984
Send Email Send Email
 
Hi,

I've a question about the difference of the model-based agent(mba) and
the goal-based agent (gba) without regarding the difference of reflex
and goal.

I mean the mba has informations about the world evolves, if he does an
action, right? But with this knowledge he knows about the world after
his action? I don't understand that the mba has no knowledge what the
world would be if he take an action.

Can someone explain it to me?

Greets Andi

#712 From: "special case" <engbarakat2007@...>
Date: Sat Oct 28, 2006 8:15 pm
Subject: Re: Model-based reflex agents and goal-based agents
eng_barakat2007
Send Email Send Email
 
plz review ur question

u said mba knows what happen to the world after action x taken and ur question says he didnt ???

thanx

On 10/28/06, saarlodri1984 <brotsammler@...> wrote:

Hi,

I've a question about the difference of the model-based agent(mba) and
the goal-based agent (gba) without regarding the difference of reflex
and goal.

I mean the mba has informations about the world evolves, if he does an
action, right? But with this knowledge he knows about the world after
his action? I don't understand that the mba has no knowledge what the
world would be if he take an action.

Can someone explain it to me?

Greets Andi




--
Eng. Osama Lotf Barakat

Technical Administrator;
www.ebnalyaman.com;

4th year ;
computer engineering;
Cairo Univeristy

#713 From: "Wang, Pei" <Dr.PeiWang@...>
Date: Thu Nov 2, 2006 2:20 am
Subject: "AI becomes a science (1987--present)" --- why 1987?
peiwang_99
Send Email Send Email
 
Hi,

In page 25, it is said that "AI becomes a science (1987--present)".

I understand that it doesn't make much sense to pinpoint the exact
time when this process started, but on the other hand, the authors
must choose 1987 for a reason, which I cannot find in the following
description. Can anyone help?

Thanks in advance!

Pei

#714 From: "Peter Norvig" <peter@...>
Date: Thu Nov 2, 2006 6:32 pm
Subject: Re: "AI becomes a science (1987--present)" --- why 1987?
norvig
Send Email Send Email
 
I don't have the book with me right now, but I believe we took the (as
you say, quite arbitrary) turning point to be Pearl's book, which has
1988 as a publication date, but actually appeared in 1987.

-Peter

On 11/1/06, Wang, Pei <Dr.PeiWang@...> wrote:
> Hi,
>
> In page 25, it is said that "AI becomes a science (1987--present)".
>
> I understand that it doesn't make much sense to pinpoint the exact
> time when this process started, but on the other hand, the authors
> must choose 1987 for a reason, which I cannot find in the following
> description. Can anyone help?

#715 From: victor.lopez@...
Date: Fri Nov 3, 2006 3:49 pm
Subject: {Verificado} Re: {Disarmed} Re: "AI becomes a science (1987--present)" --- why 1987?
vlopez2010
Send Email Send Email
 

Hi Peter.

It is so nice to have an expert at hand.  I am just trying to get on the AI wagon.  I was reading some comments given by Dr. Roger Schank (who by chance I met down here in Panama City, Panama, Central América last year). So while we chat over a cup of coffe he said that the AI field is stalled due to the actual complexity for achiving the "goals" it has established for itself (since the begining), and eventhough he believes the goals can be achivied, it would take a lot deal of resources to get it (which probably nobody is willing to do) --- I hope I "tell the story the way it is" ...

I would trully appreciate your opinion on the matter ... to get some guidence from another quite qualified expert on the field.

Thanks ...

----- Message from peter@... ---------


    Date: Thu, 2 Nov 2006 10:32:30 -0800
    From: Peter Norvig <peter@...>
Reply-To: aima-talk@yahoogroups.com
Subject: {Disarmed} Re: [aima-talk] "AI becomes a science (1987--present)" --- why 1987?
      To: aima-talk@yahoogroups.com


> I don't have the book with me right now, but I believe we took the (as
> you say, quite arbitrary) turning point to be Pearl's book, which has
> 1988 as a publication date, but actually appeared in 1987.
>
> -Peter
>
> On 11/1/06, Wang, Pei <Dr.PeiWang@...> wrote:
>> Hi,
>>
>> In page 25, it is said that "AI becomes a science (1987--present)".
>>
>> I understand that it doesn't make much sense to pinpoint the exact
>> time when this process started, but on the other hand, the authors
>> must choose 1987 for a reason, which I cannot find in the following
>> description. Can anyone help?
>
> --
> Este mensaje ha sido analizado por MailScanner
> en busca de virus y otros contenidos peligrosos,
> y se considera que está limpio.
>
>


----- End message from peter@... -----



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

--
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.

#716 From: "it_expert_hina" <it_expert_hina@...>
Date: Fri Nov 10, 2006 7:53 pm
Subject: Gradient Descent Search
it_expert_hina
Send Email Send Email
 
Explain Gradient Descent Search. Is it optimal? its advantages
/disadvantages.

#717 From: "it_expert_hina" <it_expert_hina@...>
Date: Fri Nov 10, 2006 7:51 pm
Subject: SOMETHING ABOUT PROPERTIES OF HEURISTIC FUNCTION...................Reply soon
it_expert_hina
Send Email Send Email
 
Does admissibility imply monotonicity and vice versa?if not then plz
tell when monotonicity imply admissibility.

#718 From: "it_expert_hina" <it_expert_hina@...>
Date: Fri Nov 10, 2006 7:56 pm
Subject: Agents are future of AI or not AI......................
it_expert_hina
Send Email Send Email
 
Give arguments with 10 references (books / web / research paper)
about one of the following statements.

"Agents are future of AI"
  OR
"Agents are not AI"

#719 From: "Ravi Mohan" <magesmail@...>
Date: Sat Nov 11, 2006 5:41 am
Subject: Re: Agents are future of AI or not AI......................
magesmail
Send Email Send Email
 
The group is NOT a place for getting homework done.

regds,
Ravi
--- In aima-talk@yahoogroups.com, "it_expert_hina"
<it_expert_hina@...> wrote:
>
> Give arguments with 10 references (books / web / research paper)
> about one of the following statements.
>
> "Agents are future of AI"
>  OR
> "Agents are not AI"
>

#720 From: "special case" <engbarakat2007@...>
Date: Sat Nov 11, 2006 8:08 am
Subject: Re: Re: Agents are future of AI or not AI......................
eng_barakat2007
Send Email Send Email
 
with u Ravi

On 11/11/06, Ravi Mohan <magesmail@...> wrote:


The group is NOT a place for getting homework done.

regds,
Ravi
--- In aima-talk@yahoogroups.com, "it_expert_hina"
<it_expert_hina@...> wrote:
>
> Give arguments with 10 references (books / web / research paper)
> about one of the following statements.
>
> "Agents are future of AI"
> OR
> "Agents are not AI"
>




--
Eng. Osama Lotf Barakat

Technical Administrator;
www.ebnalyaman.com;

4th year ;
computer engineering;
Cairo Universty

#721 From: "Julie Avery" <cookiesncream85@...>
Date: Mon Nov 13, 2006 3:57 am
Subject: Chapter 7 Question 6
Cookiesncream85
Send Email Send Email
 
Hi, I'm having trouble understanding this question.  How can there be
other connectives other than the ones already mentioned?  Can someone
give me an example please?

Thanks.

#722 From: "j1mmy_n3u7120n" <arun031283@...>
Date: Mon Nov 13, 2006 3:35 pm
Subject: Re: Gradient Descent Search
j1mmy_n3u7120n
Send Email Send Email
 
--- In aima-talk@yahoogroups.com, "it_expert_hina"
<it_expert_hina@...> wrote:
>
> Explain Gradient Descent Search. Is it optimal? its advantages
> /disadvantages.
>
Gradient Descent Search
http://en.wikipedia.org/wiki/Gradient_descent

-- AI

#723 From: "Ravi Mohan" <magesmail@...>
Date: Wed Nov 15, 2006 6:32 am
Subject: Re: Chapter 7 Question 6
magesmail
Send Email Send Email
 
Hi,

you might want to look at what "binary connective" actually means.
hint:- Every possible truth table you can create using two variables
in effect defines a "binary connective"; and there are more than 4
such tables though most of them are useless (the question asks you to
think about why).

e.g: NAND or even something made up like UFALSE (defined as the
results are always FALSE irrespective of the values of A AND B).

Hope that helps,
Regards,
  ravi
--- In aima-talk@yahoogroups.com, "Julie Avery" <cookiesncream85@...>
wrote:
>
> Hi, I'm having trouble understanding this question.  How can there be
> other connectives other than the ones already mentioned?  Can someone
> give me an example please?
>
> Thanks.
>

#724 From: Robert Futrelle <futrelle@...>
Date: Mon Dec 4, 2006 12:03 am
Subject: "other" variables should include the Bij in Sec. 13.7
bobfutrelle
Send Email Send Email
 
In Sec. 13.7, "The Wumpus World revisted", the approach starts with
the distribution of all Pij variables, but only three of the Bij
variables, B11, B12, and B21.  It later factors out the "other"
variables, meaning only the "other" Pij ones.  Since there are
dependencies involving the "other" Bij ones, why are they not
included?  For example, there is a certain relation between P44 and
B34 which is part of the full joint.  The "other" Bij ones would also
factor out, since the results of interest are conditionally
independent of them also.

It might have been better to say that "other" includes all "other"
Pij *and* Bij ones, would it not?  Even though pits are the *cause*
of breezes, that doesn't mean that the Bij ones can simply be ignored.

   --  Bob Futrelle

#725 From: "Ivan F. Villanueva B." <ivan@...>
Date: Tue Dec 5, 2006 1:41 pm
Subject: algorithms list java
artificialidea
Send Email Send Email
 
Hello,
I would like to introduce an alternative java code for most of the algorithms in
the book. The code is extensively documented, licensed under the GPL and with
applets that can be used for teaching and learning. A list can be found in:

http://www.artificialidea.com/index.php?page=algorithms

Comments and help to improve it are welcome.
--
Iván F. Villanueva B.
A.I. library:   http://www.artificialidea.com
<<<          The European Patent Litigation Agreement (EPLA)          >>>
<<<            will bring Software patents by the backdoor            >>>
<<<                     http://epla.ffii.org/                         >>>

#726 From: Robert Futrelle <futrelle@...>
Date: Tue Dec 5, 2006 3:43 pm
Subject: Re: algorithms list java
bobfutrelle
Send Email Send Email
 
A quick glance suggests that Iván's software could be very useful to all of us.

I look forward to examining it in more detail and
to the reactions that others on this list might
have.

   - Bob Futrelle
_______________________________________________________________
Robert P. Futrelle      | Biological Knowledge Laboratory
     Associate Professor  | College of Computer  and Information
                          |     Science MS WVH202
Office: (617)-373-4239  | Northeastern University
Fax:    (617)-373-5121  | 360 Huntington Ave.
futrelle@...    | Boston, MA 02115
           http://www.ccs.neu.edu/home/futrelle
    http://www.bionlp.org   http://www.diagrams.org
_______________________________________________________________

>Hello,
>I would like to introduce an alternative java
>code for most of the algorithms in
>the book. The code is extensively documented, licensed under the GPL and with
>applets that can be used for teaching and learning. A list can be found in:
>
><http://www.artificialidea.com/index.php?page=algorithms>http://www.artificiali\
dea.com/index.php?page=algorithms
>
>Comments and help to improve it are welcome.
>--
>Iván F. Villanueva B.
>A.I. library: <http://www.artificialidea.com>http://www.artificialidea.com
><<< The European Patent Litigation Agreement (EPLA) >>>
><<< will bring Software patents by the backdoor >>>
><<< <http://epla.ffii.org/>http://epla.ffii.org/ >>>

--

#727 From: "l.gidwani" <l.gidwani@...>
Date: Tue Dec 12, 2006 12:59 pm
Subject: Figure 2.3 (A partial tabulation of a simple agent function for the vacuum-clean
l.gidwani
Send Email Send Email
 
I have a very fundamental question.

Figure 2.3 has the following percept sequence:

[A, Clean] [A, Clean] [A, Clean]

I feel that this percept sequence is not possible because after the
first [A, Clean] percept the agent will be in [B, xx] therefore it
will not receive the [A, Clean] percept.

Any help regarding this fundamental problem will be helpful.
Meanwhile, I will read the material more carefully once more.

Sincerely,

Lalit Gidwnai

#728 From: "Ahmed Mostafa" <eng.ahmed2007@...>
Date: Thu Jan 4, 2007 11:03 am
Subject: [AI] Chapter 25: Mixed cells
eng_ahmedm2003
Send Email Send Email
 
ÇáÓáÇã Úáíßã æÑÍãÉ Çááå æÈÑßÇÊå
 
Does "mixed cells" mean cells that are in the free space but not reachable? or cells that have parts in the free space and parts in the occupied space? or what?

ÇáÓáÇã Úáíßã æÑÍãÉ Çááå æÈÑßÇÊå
--
Ahmed Mostafa
0108533490
Fourth Year,
Computer Engineering Department,
Faculty of Engineering
Cairo University

#729 From: "v_r_boy" <hadi.farnoud@...>
Date: Sun Jan 7, 2007 11:49 am
Subject: AI in chess
v_r_boy
Send Email Send Email
 
my final project of AI course is about AI in chess,i searched and
found many resources but isn't so good :(

anyone can help me ?

#730 From: "special case" <engbarakat2007@...>
Date: Mon Jan 8, 2007 4:40 am
Subject: Re: AI in chess
eng_barakat2007
Send Email Send Email
 
its general can u specific some points ??
 


 
On 1/7/07, v_r_boy <hadi.farnoud@...> wrote:

my final project of AI course is about AI in chess,i searched and
found many resources but isn't so good :(

anyone can help me ?




--
Eng. Osama Lotf Barakat

Technical Administrator;
www.ebnalyaman.com;

4th year ;
computer engineering;
Cairo Universty

Messages 701 - 730 of 946   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help