Search the web
Sign In
New User? Sign Up
aima-talk · AI: A Modern Approach: Help for the text
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 838 - 868 of 868   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries   (Group by Topic) Sort by Date ^  
#838 From: "kiana" <blacksilk79@...>
Date: Wed Sep 24, 2008 8:53 pm
Subject: Chapter 3 discussion
blacksilk79
Offline Offline
Send Email Send Email
 
I understand the material in the chapter. However, the exercises are
completely confusing to me. Therefore, a discussion of the chapter may
clarify. For the 8-puzzle problem, I am not able to understand the
existence of two disjoint sets of all possible states in which a state
from one set can't transform to a state in the other set by any number
of moves. I would assume any state can be reached by in other state. In
other words, there are situations (initial state - goal configuration)
in which the puzzle isn't solvable? Does the two disjoint sets exit
because the problem becomes an NP-Complete problem for those states
trying to reach the states in the other disjoint set. And, the 9!/2
calculation for all possible states derives from this theorem of
exactly half of the possible states transform into a given goal, is
this true?

#839 From: "kiana" <blacksilk79@...>
Date: Wed Sep 24, 2008 8:38 pm
Subject: Re: Fig. 3.4 Edition 2
blacksilk79
Offline Offline
Send Email Send Email
 
--- In aima-talk@yahoogroups.com, ramanathan pl <ramkrshn36@...>
wrote:
>
> Hi,
>
> When I was going through the 8 puzzle example in fig. 3.4 of AIMA
2nd edition, I found that from the given start state (7 2 4 5 0 6 8 3
1), it is NOT possible to reach the given Goal state ( 0 1 2 3 4 5 6
7 8) since both the states belong to two disjoint sets and it is not
possible to transform from a state in one set to a state in another
set , immaterial of how many moves we make.
>
> Any similar comments and discussions appreciated.
>
> Thanks
> Ram
>
>
>
>
>
It's evident two disjoint sets of all possible states for the 8-
puzzle problem exist. However, I don't understand. I would assume it
is possible to reach any state from a given state. What are the
differences between the two disjoint sets? I am seriously confused.
______________________________________________________________________
_________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>

#840 From: "kiana" <blacksilk79@...>
Date: Wed Sep 24, 2008 9:25 pm
Subject: Re: Chapter 3 discussion
blacksilk79
Offline Offline
Send Email Send Email
 
--- In aima-talk@yahoogroups.com, "kiana" <blacksilk79@...> wrote:
>
> I understand the material in the chapter. However, the exercises
are
> completely confusing to me. Therefore, a discussion of the chapter
may
> clarify. For the 8-puzzle problem, I am not able to understand the
> existence of two disjoint sets of all possible states in which a
state
> from one set can't transform to a state in the other set by any
number
> of moves. I would assume any state can be reached by in other
state. In
> other words, there are situations (initial state - goal
configuration)
> in which the puzzle isn't solvable? Does the two disjoint sets exit
> because the problem becomes an NP-Complete problem for those states
> trying to reach the states in the other disjoint set. And, the 9!/2
> calculation for all possible states derives from this theorem of
> exactly half of the possible states transform into a given goal, is
> this true?
>
I'm confused, any clarification is greatly appreciated.

#841 From: "kiana" <blacksilk79@...>
Date: Wed Sep 24, 2008 9:20 pm
Subject: Re: Chapter 3 discussion
blacksilk79
Offline Offline
Send Email Send Email
 
--- In aima-talk@yahoogroups.com, "kiana" <blacksilk79@...> wrote:
>
> I understand the material in the chapter. However, the exercises
are
> completely confusing to me. Therefore, a discussion of the chapter
may
> clarify. For the 8-puzzle problem, I am not able to understand the
> existence of two disjoint sets of all possible states in which a
state
> from one set can't transform to a state in the other set by any
number
> of moves. I would assume any state can be reached by in other
state. In
> other words, there are situations (initial state - goal
configuration)
> in which the puzzle isn't solvable? Does the two disjoint sets exit
> because the problem becomes an NP-Complete problem for those states
> trying to reach the states in the other disjoint set. And, the 9!/2
> calculation for all possible states derives from this theorem of
> exactly half of the possible states transform into a given goal, is
> this true?
>
Discussions of the topics in the book leads to a better understanding
of the material. I need clarification of the topics in order to
answer the exercies, not necessarily the answer to the questions. In
order for me to understand the material further, I need to understand
the questions. The existence of the disjoint sets were discussed in
book, so I would like to elaborate on that topic. I don't understand
that section of the book. Thank you.

#842 From: "inyourmind6684" <dtamayo@...>
Date: Thu Sep 25, 2008 6:18 am
Subject: Problems with AIMA code QueueSearch
inyourmind6684
Offline Offline
Send Email Send Email
 
I'm looking to create a test file and successor function for BFS in
the AIMA code. However, in order to instantiate a BFS I have to pass
in a QueueSearch. I ran into the problem when trying to instantiate
the QueueSearch. I know that QueueSearch extends the NodeExpander but
I've tried several ways to instantiate it and I keep getting
complaints from eclipse. Does anyone know how to create a QueueSearch
so that eclipse doesn't complain?

Thank you for your time.

#843 From: "Ravi Mohan" <magesmail@...>
Date: Thu Sep 25, 2008 9:32 am
Subject: Re: Problems with AIMA code QueueSearch
magesmail
Offline Offline
Send Email Send Email
 
The code for QueueSearch begins as follows

"public abstract class QueueSearch  .... "

The "abstract" keyword implies you cannot instantiate the class. You
need to instantiate one of its concrete subclasses (TreeSearch or
GraphSearch).

The demo and unit test classes have a dozen plus examples of how these
may be instantiated. The readme file explains the two hierarchies of
search and how they relate to each other.

"> I've tried several ways to instantiate it and I keep getting
> complaints from eclipse."

When this happens the next time, do try to understand what the error
message is trying to communicate. An attempt at doing this would have
exposed the "trying to instantiate an abstract class" error.

In other words, eclipse complains for a reason!



--- In aima-talk@yahoogroups.com, "inyourmind6684" <dtamayo@...> wrote:
>
> I'm looking to create a test file and successor function for BFS in
> the AIMA code. However, in order to instantiate a BFS I have to pass
> in a QueueSearch. I ran into the problem when trying to instantiate
> the QueueSearch. I know that QueueSearch extends the NodeExpander but
> I've tried several ways to instantiate it and I keep getting
> complaints from eclipse. Does anyone know how to create a QueueSearch
> so that eclipse doesn't complain?
>
> Thank you for your time.
>

#844 From: "kiana" <blacksilk79@...>
Date: Sun Sep 28, 2008 7:09 pm
Subject: Re: Problems with AIMA code QueueSearch
blacksilk79
Offline Offline
Send Email Send Email
 
--- In aima-talk@yahoogroups.com, "inyourmind6684" <dtamayo@...> wrote:
>
> I'm looking to create a test file and successor function for BFS in
> the AIMA code. However, in order to instantiate a BFS I have to pass
> in a QueueSearch. I ran into the problem when trying to instantiate
> the QueueSearch. I know that QueueSearch extends the NodeExpander but
> I've tried several ways to instantiate it and I keep getting
> complaints from eclipse. Does anyone know how to create a QueueSearch
> so that eclipse doesn't complain?
>
> Thank you for your time.
>
Do we use the AIMA code examples, i.e. BFS and QueueSearch, for the
exercises in the book? Or, are we supposed to define and implement all
of the code for the exercises ourselves?

#845 From: "Nima Talebi" <nima.talebi@...>
Date: Thu Oct 23, 2008 2:08 pm
Subject: Re: Excercise 18.14, page 677
daashmashty
Offline Offline
Send Email Send Email
 
Okay, I can already see a flaw in this, here's my revised version...

I've attached my formula as a png, hope it gets through, in case it doesn't...

Text:
E=|_sum_{{i=0};{i=M-m};{|_pmatrix1x2_{{M};{m+i}}ε^{m+i}}}

LaTeX:
\mbox{E}=\sum_{i=0}^{i=M-m}{\left(\begin{array}{c} M \\ m+i \end{array}\right)\epsilon ^{m+i}}

...where m is the bigger half - that is the `half' that has just enough power to out-weight the other half, for example where M = 20, m = 11, where M = 5, m = 3.

Again, I don't think I have the right, or at least most elegant solution to the problem, I feel it has to be much simpler - otherwise the question wouldn't seriously expect us to calculate the above formula for M = 20 as that sum would expand into 9 terms!

Nima


On Fri, Oct 24, 2008 at 12:37 AM, Nima Talebi <nima.talebi@...> wrote:
Hi,

I'm interested to see if my solution is even remotely correct, the question is to derive the error formula given the number of experts/hypotheses (M) and also the error of each hypotheses (e) - assuming all to be the same, and that all are independent of one another...

I treated this as a probability problem (and unsure if I should have done so), and hence derived a formula which yields the following results...

M:5, e:0.10, 0.0100
M:5, e:0.20, 0.0800
M:5, e:0.40, 0.6400
M:10, e:0.10, 0.0002
M:10, e:0.20, 0.0134
M:10, e:0.40, 0.8602
M:20, e:0.10, 0.0000
M:20, e:0.20, 0.0034
M:20, e:0.40, 7.0448

The third column is the total error for the network I calculated; it certainly looks wrong from looking at the last value, but I'd like to know how to go about solving this as it's rather intriguing.

My `formula' in Python form is as follows...

def fact(k):
  return reduce(lambda i, j : i*j, range(1, k+1))

for M in 5, 10, 20:
  for e in 0.1, 0.2, 0.4:
    m  = M/2+1
    _m = M-m

    print "M:%d, e:%0.2f, %0.4f"%(M, e, (fact(M) * pow(e, m))/(fact(_m) * fact(m)))
 
Thanks to anyone who has a crack at solving this =)

Nima




--
Nima Talebiw: http://ai.autonomy.net.au/                    
p: +61-4-0667-7607  m: nima@...

#846 From: "Nima Talebi" <nima.talebi@...>
Date: Thu Oct 23, 2008 1:37 pm
Subject: Excercise 18.14, page 677
daashmashty
Offline Offline
Send Email Send Email
 
Hi,

I'm interested to see if my solution is even remotely correct, the question is to derive the error formula given the number of experts/hypotheses (M) and also the error of each hypotheses (e) - assuming all to be the same, and that all are independent of one another...

I treated this as a probability problem (and unsure if I should have done so), and hence derived a formula which yields the following results...

M:5, e:0.10, 0.0100
M:5, e:0.20, 0.0800
M:5, e:0.40, 0.6400
M:10, e:0.10, 0.0002
M:10, e:0.20, 0.0134
M:10, e:0.40, 0.8602
M:20, e:0.10, 0.0000
M:20, e:0.20, 0.0034
M:20, e:0.40, 7.0448

The third column is the total error for the network I calculated; it certainly looks wrong from looking at the last value, but I'd like to know how to go about solving this as it's rather intriguing.

My `formula' in Python form is as follows...

def fact(k):
  return reduce(lambda i, j : i*j, range(1, k+1))

for M in 5, 10, 20:
  for e in 0.1, 0.2, 0.4:
    m  = M/2+1
    _m = M-m

    print "M:%d, e:%0.2f, %0.4f"%(M, e, (fact(M) * pow(e, m))/(fact(_m) * fact(m)))
 
Thanks to anyone who has a crack at solving this =)

Nima


#847 From: "daashmashty" <nima.talebi@...>
Date: Thu Oct 23, 2008 10:51 pm
Subject: Re: Excercise 18.14, page 677
daashmashty
Offline Offline
Send Email Send Email
 
The attachment was stripped as suspected, so here's the readable version...

http://ai.autonomy.net.au/chrome/site/AIMA-18.4.png

Nima

--- In aima-talk@yahoogroups.com, "Nima Talebi" <nima.talebi@...> wrote:
>
> Okay, I can already see a flaw in this, here's my revised version...
>
> I've attached my formula as a png, hope it gets through, in case it
> doesn't...
>
> *Text:*
> E=|_sum_{{i=0};{i=M-m};{|_pmatrix1x2_{{M};{m+i}}ε^{m+i}}}
>
> *LaTeX:
> *\mbox{E}=\sum_{i=0}^{i=M-m}{\left(\begin{array}{c} M \\ m+i
> \end{array}\right)\epsilon ^{m+i}}
>
> ...where m is the *bigger half* - that is the `half' that has just enough
> power to out-weight the other half, for example where M = 20, m = 11, where
> M = 5, m = 3.
>
> Again, I don't think I have the right, or at least most elegant solution to
> the problem, I feel it has to be much simpler - otherwise the question
> wouldn't seriously expect us to calculate the above formula for M = 20 as
> that sum would expand into 9 terms!
>
> Nima
>
>
> On Fri, Oct 24, 2008 at 12:37 AM, Nima Talebi <nima.talebi@...> wrote:
>
> > Hi,
> >
> > I'm interested to see if my solution is even remotely correct, the question
> > is to derive the error formula given the number of experts/hypotheses (M)
> > and also the error of each hypotheses (e) - assuming all to be the same, and
> > that all are independent of one another...
> >
> > I treated this as a probability problem (and unsure if I should have done
> > so), and hence derived a formula which yields the following results...
> >
> > M:5, e:0.10, 0.0100
> > M:5, e:0.20, 0.0800
> > M:5, e:0.40, 0.6400
> > M:10, e:0.10, 0.0002
> > M:10, e:0.20, 0.0134
> > M:10, e:0.40, 0.8602
> > M:20, e:0.10, 0.0000
> > M:20, e:0.20, 0.0034
> > M:20, e:0.40, 7.0448
> >
> > The third column is the total error for the network I calculated; it
> > certainly looks wrong from looking at the last value, but I'd like to know
> > how to go about solving this as it's rather intriguing.
> >
> > My `formula' in Python form is as follows...
> >
> > def fact(k):
> >   return reduce(lambda i, j : i*j, range(1, k+1))
> >
> > for M in 5, 10, 20:
> >   for e in 0.1, 0.2, 0.4:
> >     m  = M/2+1
> >     _m = M-m
> >
> >     print "M:%d, e:%0.2f, %0.4f"%(M, e, (fact(M) * pow(e, m))/(fact(_m) *
> > fact(m)))
> >
> > Thanks to anyone who has a crack at solving this =)
> >
> > Nima
> >
> >
>
>
> --
> Nima Talebiw: http://ai.autonomy.net.au/
> p: +61-4-0667-7607  m: nima@...
>

#848 From: "sprgr77" <sprgr77@...>
Date: Sun Nov 2, 2008 7:56 am
Subject: looking for soloutions
sprgr77
Offline Offline
Send Email Send Email
 
Iam interested in AI .I need guidelines to solve the exercises in the
book"Artificial intelligence A modern approach".

#849 From: "daashmashty" <nima.talebi@...>
Date: Sun Nov 2, 2008 12:31 pm
Subject: Re: looking for soloutions
daashmashty
Offline Offline
Send Email Send Email
 
--- In aima-talk@yahoogroups.com, "sprgr77" <sprgr77@...> wrote:
>
> Iam interested in AI .I need guidelines to solve the exercises in the
> book"Artificial intelligence A modern approach".
>

...and your question would be... ?

#850 From: "Mani Sabri" <mani_sabri@...>
Date: Sat Dec 6, 2008 7:32 am
Subject: AIMA python
mani_sabri
Offline Offline
Send Email Send Email
 
hi
I was looking at AIMA python code repository in google and asking
myself is python still considered viable in this community. the java
repository seems to have all the recent focus and development. why?
personal preferences of project owners or some other reasons?


Best Regards
Mani

#851 From: "Ravi Mohan" <magesmail@...>
Date: Sat Dec 6, 2008 8:11 am
Subject: Re: AIMA python
magesmail
Offline Offline
Send Email Send Email
 
Hi,

I wouldn't want to speak for the maintainers  of the python
repository, but as the maintainer of the java code repository I think
it is important to understand how open source works.

The amount of progress is directly dependent on how much free time and
energy the maintainers have and often this has peaks and lulls. I
wrote most of the java code for AIMA, but I have been insanely busy
over the last year. Dr Ciaran O'Reilly has been adding a *lot* of
code, however, mostly in the logic section, but also filling in some
of the gaps in search.(see the svn branch dedicated to this effort.
This will be merged into  a new release soon).

Next year, (2009) I'll have more free time and I plan to add graphics
to the existing codebase. Particularly for small projects with
contributors in the single digits, this ebb and flow is just how it works.

If you believe that Python makes a good implementation language (I
think it does - the size of the python implementation of an algorithm
is a fraction of the size of the equivalent java code), please
contribute some code. That way, everyone wins.

My 2 cents,

Ravi


--- In aima-talk@yahoogroups.com, "Mani Sabri" <mani_sabri@...> wrote:
>
> hi
> I was looking at AIMA python code repository in google and asking
> myself is python still considered viable in this community. the java
> repository seems to have all the recent focus and development. why?
> personal preferences of project owners or some other reasons?
>
>
> Best Regards
> Mani
>

#853 From: "Nima Talebi" <nima.talebi@...>
Date: Sun Dec 7, 2008 1:47 am
Subject: Re: Re: AIMA python
daashmashty
Offline Offline
Send Email Send Email
 
Hi Mani

I've started writing a framework, however it's not necessarily because there doesn't exist a framework which I can use (maybe one exists that is good, and maybe there isn't)...  My main reason is to get a deeper understanding; As Confucious said...

I hear and I forget. I see and I remember. I do and I understand.

Anyway, I'm using Objective-C and C, and the Cocoa framework.  I'd like to learn how to integrate python and ObjC (I think it is possible, but have failed to get it working)... I think that would be awesome for me - as I can write proof-of-concepts in python, then convert parts to C/ObjC as I see fit.

So far I've implemented a Multi-layer (non-recurrent) NN with back-prop in python, SOM with various 1D, 2D and 3D lattices and an OpenGL view of the machine learning, and similarly a Perceptron.

I'm not sure how many people here would be interested in writing Mac software though =)

Nima

 

On Sat, Dec 6, 2008 at 8:45 PM, Mani Sabri <mani_sabri@...> wrote:

No doubt that python makes a good implementation language. and it will
be fast enough if we use Pyrex or Cython along with c/c++ extensions.
I wrote some code for multi-Agent realtime environments and later I
found out that there is a project named SPADE (Smart Python
multi-Agent Development Environment) which use XMPP/Jabber and
implements FIPA standards but the problem with SPADE is that there is
no community around them (no forum no mailing list just the emails of
the owners).
so I don't know where to start, I want to learn and to have a serious
framework at the end of my study, may be its not the right direction
(is it?) but if it is I will be glad to contribute to this project or
make a fork of it and ...

Best Regards
Mani


--- In aima-talk@yahoogroups.com, "Ravi Mohan" <magesmail@...> wrote:
>
> Hi,
>
> I wouldn't want to speak for the maintainers of the python
> repository, but as the maintainer of the java code repository I think
> it is important to understand how open source works.
>
> The amount of progress is directly dependent on how much free time and
> energy the maintainers have and often this has peaks and lulls. I
> wrote most of the java code for AIMA, but I have been insanely busy
> over the last year. Dr Ciaran O'Reilly has been adding a *lot* of
> code, however, mostly in the logic section, but also filling in some
> of the gaps in search.(see the svn branch dedicated to this effort.
> This will be merged into a new release soon).
>
> Next year, (2009) I'll have more free time and I plan to add graphics
> to the existing codebase. Particularly for small projects with
> contributors in the single digits, this ebb and flow is just how it
works.
>
> If you believe that Python makes a good implementation language (I
> think it does - the size of the python implementation of an algorithm
> is a fraction of the size of the equivalent java code), please
> contribute some code. That way, everyone wins.
>
> My 2 cents,
>
> Ravi
>
>
> --- In aima-talk@yahoogroups.com, "Mani Sabri" <mani_sabri@> wrote:
> >
> > hi
> > I was looking at AIMA python code repository in google and asking
> > myself is python still considered viable in this community. the java
> > repository seems to have all the recent focus and development. why?
> > personal preferences of project owners or some other reasons?
> >
> >
> > Best Regards
> > Mani
> >
>




--
Nima Talebiw: http://ai.autonomy.net.au/                    
p: +61-4-0667-7607  m: nima@...

#854 From: Bob Futrelle <bob.futrelle@...>
Date: Wed Jan 21, 2009 12:32 pm
Subject: Fig 3.1 vs rest of chapter?
bobfutrelle
Offline Offline
Send Email Send Email
 
The formulation in Fig 3.1 is not mentioned again, so its application
to the clear examples in Sec 3.2 is obscure at best.

How *does* it apply? Esp. since it only returns a single action.

    -- Bob Futrelle

Newton Mass &
Northeastern University
Sent from my iPhone

#855 From: Peter Norvig <peter@...>
Date: Thu Jan 22, 2009 5:58 pm
Subject: Re: Fig 3.1 vs rest of chapter?
norvig
Offline Offline
Send Email Send Email
 
You're right; Fig 3.1 is not well-integrated with the text -- but we will have better integration in the 3rd edition of AIMA.

As for how it works: the idea is that if the agent has a plan (in the variable seq), it executes the plan, one step each time it is called.  If it does not have a plan, it forumlates a goal, then a problem, then searches for a plan that solves the problem, then begins executing it.

-Peter

On Wed, Jan 21, 2009 at 4:32 AM, Bob Futrelle <bob.futrelle@...> wrote:
The formulation in Fig 3.1 is not mentioned again, so its application
to the clear examples in Sec 3.2 is obscure at best.

How *does* it apply? Esp. since it only returns a single action.

  -- Bob Futrelle

Newton Mass &
Northeastern University
Sent from my iPhone

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

Yahoo! Groups Links

<*> To visit your group on the web, go to:
   http://groups.yahoo.com/group/aima-talk/

<*> Your email settings:
   Individual Email | Traditional

<*> To change settings online go to:
   http://groups.yahoo.com/group/aima-talk/join
   (Yahoo! ID required)

<*> To change settings via email:
   mailto:aima-talk-digest@yahoogroups.com
   mailto:aima-talk-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
   aima-talk-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
   http://docs.yahoo.com/info/terms/



#856 From: Victor Dalmagro <victor.dalmagro@...>
Date: Mon Mar 9, 2009 3:13 pm
Subject: Re: Chapter 7 - Algorithm 7.12
victor.dalmagro
Offline Offline
Send Email Send Email
 
Hi all!
 
I'm new in AI and I cannot understand this algorithm. Can anybody give me a help?
 
Thanks in advance!
 
Victor 



Yahoo! Cocina
Recetas prácticas y comida saludable
Visitá http://ar.mujer.yahoo.com/cocina/

#857 From: "victor.dalmagro" <victor.dalmagro@...>
Date: Thu Mar 12, 2009 1:32 pm
Subject: Chapter 7 - Algorithm 7.12
victor.dalmagro
Offline Offline
Send Email Send Email
 
Hi all!

I'm new in AI and I cannot understand this algorithm. Can anybody give me a
help?

Thanks in advance!

Victor

#858 From: "Peter Norvig" <peter@...>
Date: Wed Apr 22, 2009 4:51 am
Subject: AIMA 3rd edition cover design contest
norvig
Offline Offline
Send Email Send Email
 
We're having a contest to design the cover for the 3rd edition.

Open to instructors and students, see the contest rules at
http://media.pearsoncmg.com/ph/esm/ecs_ai/ .  Deadline June 15th.

-Peter Norvig

#859 From: Donnchadh Ó Donnabháin <donnchadh@...>
Date: Wed Apr 22, 2009 9:11 am
Subject: Re: AIMA 3rd edition cover design contest
dodonnabhain
Offline Offline
Send Email Send Email
 
That's great. Is there any information available on what to expect in
the 3rd edition or an estimate of when to expect it to be available
for purchase?

   Thanks

     Donnchadh

2009/4/22 Peter Norvig <peter@...>:
>
>
> We're having a contest to design the cover for the 3rd edition.
>
> Open to instructors and students, see the contest rules at
> http://media.pearsoncmg.com/ph/esm/ecs_ai/ . Deadline June 15th.
>
> -Peter Norvig
>

#860 From: <futrelle@...>
Date: Wed Apr 22, 2009 12:57 pm
Subject: Re: AIMA 3rd edition cover design contest
bobfutrelle
Offline Offline
Send Email Send Email
 
Light-hearted suggestion:

Instead of God's finger touching Adam, ala Michelangelo, we could have a
human in the clouds touching the finger of a robot agent.


  - Bob Futrelle



On 12:51:03 am 04/22/09 "Peter Norvig" <peter@...> wrote:
>
>
>
>             We're having a contest to design the cover for the 3rd
> edition.
> Open to instructors and students, see the contest rules at
> http://media.pearsoncmg.com/ph/esm/ecs_ai/ .  Deadline June 15th.
> -Peter Norvig
>
>
>
>

#861 From: Bilal Hayat Butt <bilal_hayat_butt@...>
Date: Mon Apr 27, 2009 2:19 pm
Subject: Re: AIMA 3rd edition cover design contest
bilal_hayat_...
Offline Offline
Send Email Send Email
 

Whats the point in having it for US residents only?

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

2. Eligibility.

Open to legal U.S. residents, that are instructors or students (enrolled at a two- or four-year college).

[3 ! |_ /\ |_

--- On Wed, 4/22/09, Peter Norvig <peter@...> wrote:
From: Peter Norvig <peter@...>
Subject: [aima-talk] AIMA 3rd edition cover design contest
To: aima-talk@yahoogroups.com
Date: Wednesday, April 22, 2009, 9:51 AM

We're having a contest to design the cover for the 3rd edition.

Open to instructors and students, see the contest rules at http://media. pearsoncmg. com/ph/esm/ ecs_ai/ . Deadline June 15th.

-Peter Norvig



#862 From: "Peter Norvig" <peter@...>
Date: Tue Apr 28, 2009 5:59 pm
Subject: Re: AIMA 3rd edition cover design contest
norvig
Offline Offline
Send Email Send Email
 
If it were up to me, I would have it open to anyone, regardless of residency,
and regardless of status as a student or teacher.  But Prentice Hall has legal
issues they have to work with, and that's what they decided would be easiest.

-Peter

--- In aima-talk@yahoogroups.com, Bilal Hayat Butt <bilal_hayat_butt@...> wrote:
>
> Whats the point in having it for US residents only?
> ---------------
> 2.  Eligibility.
>
> Open to legal U.S. residents, that are instructors or students (enrolled at a
two- or four-year college).
>
> [3 ! |_ /

#863 From: Nima Talebi <nima.talebi@...>
Date: Wed Apr 29, 2009 1:09 am
Subject: Re: Re: AIMA 3rd edition cover design contest
daashmashty
Offline Offline
Send Email Send Email
 
Good think this came up - I had already started :/

That'll teach me to `assume' that I'm eligible =)

Nima

On Wed, Apr 29, 2009 at 3:59 AM, Peter Norvig <peter@...> wrote:


If it were up to me, I would have it open to anyone, regardless of residency, and regardless of status as a student or teacher. But Prentice Hall has legal issues they have to work with, and that's what they decided would be easiest.

-Peter



--- In aima-talk@yahoogroups.com, Bilal Hayat Butt <bilal_hayat_butt@...> wrote:
>
> Whats the point in having it for US residents only?
> ---------------
> 2. Eligibility.
>
> Open to legal U.S. residents, that are instructors or students (enrolled at a two- or four-year college).
>
> [3 ! |_ /




--
Nima Talebiw: http://ai.autonomy.net.au/                    
p: +61-4-0667-7607  m: nima@...

#864 From: James Clemence <jamesvclemence@...>
Date: Sat May 2, 2009 11:25 pm
Subject: Pathing
jamesvclemence@...
Send Email Send Email
 
I've been looking through the python code for the search algorithms. I must acknowledge that I am pretty new to python, so apologies for basic mistakes. Having dragged the various needed classes and subclasses etc. from the original setup, I'm left with:

#!/usr/bin/python

from __future__ import generators

import math
import random
import sys
import time
import bisect
import string
import sets

infinity = 1.0e400

class Problem:
    """The abstract class for a formal problem.  You should subclass this and
    implement the method successor, and possibly __init__, goal_test, and
    path_cost. Then you will create instances of your subclass and solve them
    with the various search functions."""

    def __init__(self, initial, goal=None):
        """The constructor specifies the initial state, and possibly a goal
        state, if there is a unique goal.  Your subclass's constructor can add
        other arguments."""
        self.initial = initial; self.goal = goal

    def successor(self, state):
        """Given a state, return a sequence of (action, state) pairs reachable
        from this state. If there are many successors, consider an iterator
        that yields the successors one at a time, rather than building them
        all at once. Iterators will work fine within the framework."""
        abstract

    def goal_test(self, state):
        """Return True if the state is a goal. The default method compares the
        state to self.goal, as specified in the constructor. Implement this
        method if checking against a single self.goal is not enough."""
        return state == self.goal

    def path_cost(self, c, state1, action, state2):
        """Return the cost of a solution path that arrives at state2 from
        state1 via action, assuming cost c to get up to state1. If the problem
        is such that the path doesn't matter, this function will only look at
        state2.  If the path does matter, it will consider c and maybe state1
        and action. The default method costs 1 for every step in the path."""
        return c + 1

    def value(self):
        """For optimization problems, each state has a value.  Hill-climbing
        and related algorithms try to maximize this value."""
        abstract

class Node:
    """A node in a search tree. Contains a pointer to the parent (the node
    that this is a successor of) and to the actual state for this node. Note
    that if a state is arrived at by two paths, then there are two nodes with
    the same state.  Also includes the action that got us to this state, and
    the total path_cost (also known as g) to reach the node.  Other functions
    may add an f and h value; see best_first_graph_search and astar_search for
    an explanation of how the f and h values are handled. You will not need to
    subclass this class."""

    def __init__(self, state, parent=None, action=None, path_cost=0):
        "Create a search tree Node, derived from a parent by an action."
        update(self, state=state, parent=parent, action=action,
               path_cost=path_cost, depth=0)
        if parent:
            self.depth = parent.depth + 1

    def __repr__(self):
        return "<Node %s>" % (self.state,)

    def path(self):
        "Create a list of nodes from the root to this node."
        x, result = self, [self]
        while x.parent:
            result.append(x.parent)
            x = x.parent
        return result

    def expand(self, problem):
        "Return a list of nodes reachable from this node. [Fig. 3.8]"
        return [Node(next, self, act,
                     problem.path_cost(self.path_cost, self.state, act, next))
                for (act, next) in problem.successor(self.state)]

class Graph:
    """A graph connects nodes (verticies) by edges (links).  Each edge can also
    have a length associated with it.  The constructor call is something like:
        g = Graph({'A': {'B': 1, 'C': 2})
    this makes a graph with 3 nodes, A, B, and C, with an edge of length 1 from
    A to B,  and an edge of length 2 from A to C.  You can also do:
        g = Graph({'A': {'B': 1, 'C': 2}, directed=False)
    This makes an undirected graph, so inverse links are also added. The graph
    stays undirected; if you add more links with g.connect('B', 'C', 3), then
    inverse link is also added.  You can use g.nodes() to get a list of nodes,
    g.get('A') to get a dict of links out of A, and g.get('A', 'B') to get the
    length of the link from A to B.  'Lengths' can actually be any object at
    all, and nodes can be any hashable object."""

    def __init__(self, dict=None, directed=True):
        self.dict = dict or {}
        self.directed = directed
        if not directed: self.make_undirected()

    def make_undirected(self):
        "Make a digraph into an undirected graph by adding symmetric edges."
        for a in self.dict.keys():
            for (b, distance) in self.dict[a].items():
                self.connect1(b, a, distance)

    def connect(self, A, B, distance=1):
        """Add a link from A and B of given distance, and also add the inverse
        link if the graph is undirected."""
        self.connect1(A, B, distance)
        if not self.directed: self.connect1(B, A, distance)

    def connect1(self, A, B, distance):
        "Add a link from A to B of given distance, in one direction only."
        self.dict.setdefault(A,{})[B] = distance

    def get(self, a, b=None):
        """Return a link distance or a dict of {node: distance} entries.
        .get(a,b) returns the distance or None;
        .get(a) returns a dict of {node: distance} entries, possibly {}."""
        links = self.dict.setdefault(a, {})
        if b is None: return links
        else: return links.get(b)

    def nodes(self):
        "Return a list of nodes in the graph."
        return self.dict.keys()

class GraphProblem(Problem):
    "The problem of searching a graph from one node to another."
    def __init__(self, initial, goal, graph):
        Problem.__init__(self, initial, goal)
        self.graph = graph

    def successor(self, A):
        "Return a list of (action, result) pairs."
        return [(B, B) for B in self.graph.get(A).keys()]

    def path_cost(self, cost_so_far, A, action, B):
        return cost_so_far + (self.graph.get(A,B) or infinity)

    def h(self, node):
        "h function is straight-line distance from a node's state to goal."
        locs = getattr(self.graph, 'locations', None)
        if locs:
            return int(distance(locs[node.state], locs[self.goal]))
        else:
            return infinity

class Queue:
    """Queue is an abstract class/interface. There are three types:
        Stack(): A Last In First Out Queue.
        FIFOQueue(): A First In First Out Queue.
        PriorityQueue(lt): Queue where items are sorted by lt, (default <).
    Each type supports the following methods and functions:
        q.append(item)  -- add an item to the queue
        q.extend(items) -- equivalent to: for item in items: q.append(item)
        q.pop()         -- return the top item from the queue
        len(q)          -- number of items in q (also q.__len())
    Note that isinstance(Stack(), Queue) is false, because we implement stacks
    as lists.  If Python ever gets interfaces, Queue will be an interface."""

    def __init__(self):
        abstract

    def extend(self, items):
        for item in items: self.append(item)

class PriorityQueue(Queue):
    """A queue in which the minimum (or maximum) element (as determined by f and
    order) is returned first. If order is min, the item with minimum f(x) is
    returned first; if order is max, then it is the item with maximum f(x)."""
    def __init__(self, order=min, f=lambda x: x):
        update(self, A=[], order=order, f=f)
    def append(self, item):
        bisect.insort(self.A, (self.f(item), item))
    def __len__(self):
        return len(self.A)
    def pop(self):
        if self.order == min:
            return self.A.pop(0)[1]
        else:
            return self.A.pop()[1]

def update(x, **entries):
    """Update a dict; or an object with slots; according to entries.
    >>> update({'a': 1}, a=10, b=20)
    {'a': 10, 'b': 20}
    >>> update(Struct(a=1), a=10, b=20)
    Struct(a=10, b=20)
    """
    if isinstance(x, dict):
        x.update(entries)
    else:
        x.__dict__.update(entries)
    return x



def memoize(fn, slot=None):
    """Memoize fn: make it remember the computed value for any argument list.
    If slot is specified, store result in that slot of first argument.
    If slot is false, store results in a dictionary."""
    if slot:
        def memoized_fn(obj, *args):
            if hasattr(obj, slot):
                return getattr(obj, slot)
            else:
                val = fn(obj, *args)
                setattr(obj, slot, val)
                return val
    else:
        def memoized_fn(*args):
            if not memoized_fn.cache.has_key(
args):
                memoized_fn.cache[args] = fn(*args)
            return memoized_fn.cache[args]
        memoized_fn.cache = {}
    return memoized_fn

def graph_search(problem, fringe):
    """Search through the successors of a problem to find a goal.
    The argument fringe should be an empty queue.
    If two paths reach a state, only use the best one. [Fig. 3.18]"""
    closed = {}
    fringe.append(Node(problem.initial))
    while fringe:
        node = fringe.pop()
        if problem.goal_test(node.state):
            print Node.path
            return node
        if node.state not in closed:
            closed[node.state] = True
            fringe.extend(node.expand(problem))
        print fringe.len()
    return None

def best_first_graph_search(problem, f):
    """Search the nodes with the lowest f scores first.
    You specify the function f(node) that you want to minimize; for example,
    if f is a heuristic estimate to the goal, then we have greedy best
    first search; if f is node.depth then we have depth-first search.
    There is a subtlety: the line "f = memoize(f, 'f')" means that the f
    values will be cached on the nodes as they are computed. So after doing
    a best first search you can examine the f values of the path returned."""
    f = memoize(f, 'f')
    return graph_search(problem, PriorityQueue(min, f))


def astar_search(problem, h=None):
    """A* search is best-first graph search with f(n) = g(n)+h(n).
    You need to specify the h function when you call astar_search.
    Uses the pathmax trick: f(n) = max(f(n), g(n)+h(n))."""
    h = h or problem.h
    def f(n):
        return max(getattr(n, 'f', -infinity), n.path_cost + h(n))
    return best_first_graph_search(problem, f)

g = Graph({'A1': {'A2': 1, 'B1': 1}}, directed=False)
g.connect('A2','A3',1)
issue = GraphProblem('A1','A3',g)
astar_search(issue)

Which appears to work, and exits without any errors. However - 1/ does this solve the path? 2/ How can I get it to output the final path? I've tried with print statements within the code, and have tried adding an 'overall path' variable list, but can't seem to get it functional.

Any help would be much appreciated sorry if I've missed the obvious etc - still pretty new to this lark!

Cheers,

J


#865 From: "edgar.holleis" <edgar@...>
Date: Mon Jul 6, 2009 6:16 pm
Subject: Aima-python, several issues in csp.py
edgar.holleis
Offline Offline
Send Email Send Email
 
Hi!

I found several issues with the code in csp.py, version
aima-python.2007.06.15.zip:

1) Forward Checking and Maintain Arc Consistency don't work because of a thinko
in csp.unassign:

def unassign(self, var, assignment):
     """Remove {var: val} from assignment; that is backtrack. (...) """
     if var in assignment:
         # Reset the curr_domain to be the full original domain
         if self.curr_domains:
-->         self.curr_domains[var] = self.domains[var][:]
         del assignment[var]

That cannot work because it discards too much information. The assignments made
in previous recursions can all potentially lead to prunings of the current
node's domain. In the highlighted line, instead of carefully undoing of the
effects a particular assignment, the domain is reset to its initial value,
thereby throwing away knowledge of those earlier prunings.

Both backtrackging_search(usa, fc=True) and backtracking_search(usa, mac=True)
return incorrectly colored maps.

2) The Most Constrained Variable heuristic has it backwards and prefers less
constrained variables over more constrained variables. That's why
backtracking_search(usa, mcv=True) is guaranteed to run for many hours,
exploring the search tree in the most inefficient possible way.

3) The Least Constraining Value heuristic fails to compile on modern python.

I took the liberty of developing and testing a patch for the aforementioned
issues. Furthermore, it contains a formulation of the Sudoku problem using the
csp.py machinery.

Please find it at:
http://code.google.com/p/aima-python/issues/detail?id=11

regards,
Edgar Holleis

#866 From: "matsudayuko69" <matsuda.yuko@...>
Date: Sun Sep 13, 2009 12:11 am
Subject: Implementation Choices
matsudayuko69
Offline Offline
Send Email Send Email
 
Simple question: How about Mathemaitca for this purpose?

I've been using Lisp, C, Java and now using Mathematica.

#867 From: "juanfie" <juanf@...>
Date: Tue Sep 15, 2009 4:58 am
Subject: Re: Implementation Choices
juanfie
Offline Offline
Send Email Send Email
 
--- In aima-talk@yahoogroups.com, "matsudayuko69" <matsuda.yuko@...> wrote:
>
> Simple question: How about Mathemaitca for this purpose?
>
> I've been using Lisp, C, Java and now using Mathematica.
>

I'd be happy to contribute in developing Mathematica code for AIMA.

Regards,

Juan Flores

#868 From: "armin_04" <armin_04@...>
Date: Sat Nov 21, 2009 9:46 pm
Subject: State space size in the "First incremental formulation" for 8-queens problem
armin_04
Offline Offline
Send Email Send Email
 
The number of states for the first incremental formulation is stated to
be 64 . 63 . ... . 57.
As far as it's the "number of sequences", there is no problem, but it is
confused with "state space size" in the next paragraphs, while this
doesn't take into account the the arrangements with less than 8 queens
(1, 2, ..., 7) and also the fact that most of the states are repeated.
So, I'm guessing that the state space size should be:

64/1! + (64 . 63)/2! + ... + (64 . 63 . ... . 57)/8!

Messages 838 - 868 of 868   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

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