Giter Club home page Giter Club logo

aima-python's People

Watchers

 avatar  avatar

aima-python's Issues

We don't have that 'data' directory

If I try to run the tests

$ python doctests.py -v *.py

some fail because they can't find the data directory or the files in it.

These are the lines that originate the problems:

search.py:

BoggleFinder.wordlist = Wordlist("../data/wordlist")
(should be EN-text/wordlist)

text.py:

mandir = '../data/man/'
(should be MAN)

flatland = DataFile("flat11.txt").read() # there are two of these!
(should be EN-text/flatland.txt)

Finally, after replacing all the "../data/" with my "../aima-data/"
(checked out from the SVN repository), the tests were all successful (apart
from the one I mentioned in the other report).

--

Now I'll get back to try to understand the code, which is obviously much
more interesting. :-)

Thanks for releasing these programs with a free license, they're very
useful educational tools.

Best regards,
Matteo

Original issue reported on code.google.com by [email protected] on 1 Oct 2007 at 3:04

games.py line 121 missing argument in call to legal_moves method

What steps will reproduce the problem?
1. call random_player(game,state) in games.py
2.
3.

What is the expected output? What do you see instead?

Expected: A valid move returned

Unexpected Outcome: 
Traceback (most recent call last):
  File "<pyshell#28>", line 1, in <module>
    games.random_player(game,gamestate)
  File "/aima-python-read-only/games.py", line 121, in random_player
    return random.choice(game.legal_moves(state))
TypeError: legal_moves() takes exactly 2 arguments (1 given)


What version of the product are you using? On what operating system?

Py 2.5.2 /linux latest aima code from svn

Please provide any additional information below.

To fix change line 121 
from:
return random.choice(game.legal_moves())
to:
return random.choice(game.legal_moves(state))



Original issue reported on code.google.com by [email protected] on 30 Jun 2008 at 1:55

Bug in constructor for DataSet class within learning.py

Examples are checked via: map(self.check_example, self.examples). 
self.check_example makes reference to self.attrs and self.attrnames, both
of which have not been initialized prior to making the map call.

Moving the map call to the end of the constructor fixes the problem.  

Original issue reported on code.google.com by [email protected] on 6 Dec 2007 at 1:52

conjuncts() and disjuncts() need to be recursive

I was playing with the Criminal(West) example and the new fol_bc_ask()
stuff, couldn't get it to work unless I changed conjuncts() as follows:

def conjuncts(s):
    if isinstance(s, Expr) and s.op == '&':
        r = []
        for arg in s.args:
            r.extend (conjuncts (arg))
        return r
    else:
        return [s]

Without this change, conjuncts() will do this:
>>> conjuncts (sar.args[0])
[((American(v_1) & Weapon(v_2)) & Sells(v_1, v_2, v_3)), Hostile(v_3)]

Original issue reported on code.google.com by [email protected] on 2 Mar 2009 at 6:53

Neighbors for NY are incorrect for USA map coloring problem

What steps will reproduce the problem?
1. Open file: http://aima.cs.berkeley.edu/python/csp.py
2. Look at data for NY: "NY: VT MA CA NJ"
3. Notice that the third neighbor should be CT, not CA

What is the expected output? What do you see instead?
As above.

What version of the product are you using? On what operating system?
Latest from web.

Please provide any additional information below.
N/A

Original issue reported on code.google.com by [email protected] on 12 Nov 2007 at 9:47

Can not pass the test.

What steps will reproduce the problem?
1. python doctests.py -v *.py


What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "doctests.py", line 42, in <module>
    for name in sys.argv if name != "-v"]
ImportError: No module named *


What version of the product are you using? On what operating system?
python 2.5 
OS: windows xp

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 18 Oct 2007 at 1:30

Cannot create EnvGUI (EnvCanvas missing)

What steps will reproduce the problem?
1. $  cd aima-python
2. $ python
3.  >>> import agents
4.  >>> v = VacuumEnvironment()
5. >>> e = EnvGUI(v)

What is the expected output?

Some Tkinkter window with the Environment

 What do you see instead?

An empty Tkinkter window and an error message at the repl:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/rickard/devel/ArtificialIntelligence/aima/aima-python/agents.py", line 617, in 
__init__
    canvas = EnvCanvas(self, env, cellwidth, n)
NameError: global name 'EnvCanvas' is not defined

What version of the product are you using? On what operating system?

Svn revision 29 from Google Code on Mac OS X 10.4.11

Please provide any additional information below.

The commentary at the top of the agents.py file mentions the EnvCanvas class 
but the file 
doesn't contain a definition of it. Perhaps it is left as an excercise for the 
reader.. :-)

Original issue reported on code.google.com by [email protected] on 29 Jan 2008 at 1:57

'sorted' from python 2.4 or 2.5 makes test on 'utils.histogram' fail

1) What steps will reproduce the problem?

$ python2.4 doctests.py -v utils.py

or

$ python2.5 doctests.py -v utils.py

2) What is the expected output? What do you see instead?

Failed example:
    histogram(vals, 1) 
Expected:
    [(200, 3), (110, 2), (160, 2), (220, 1), (100, 1)]
Got:
    [(200, 3), (160, 2), (110, 2), (100, 1), (220, 1)]

3) What version of the product are you using? On what operating system?

* Code from SVN repository.
* Debian GNU/Linux (Sid, up-to-date).

4) Please provide any additional information below.

It looks like python's sorted in 2.4 or 2.5 doesn't work exactly as the one
supplied (but I can't try that because I haven't got 2.3, and on 2.4 it
doesn't work).

I'm sure this is not a bug, but maybe you're interested in having
successful tests also on python >= 2.4.

Sorry for such a useless report, otherwise. :-)

Original issue reported on code.google.com by [email protected] on 1 Oct 2007 at 2:23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.