Loading ...
Sorry, an error occurred while loading the content.

File for building Java code for algorithms in the book

Expand Messages
  • Michael B. Enders
    I tried to run Java code downloaded for ALPHA-BETA-SEARCH algorithm (figure 6.7) and got message cannot find class aima.util.Util . I would set the CLASSPATH
    Message 1 of 5 , Dec 30, 2007
    • 0 Attachment
      I tried to run Java code downloaded for ALPHA-BETA-SEARCH algorithm
      (figure 6.7) and got message "cannot find class aima.util.Util". I
      would set the CLASSPATH variable to find the file, except that as far
      as I know no such file exists on my computer and I need to download
      it. Can someone tell me how to download whatever files I need to
      compile and run the Java versions of the pseudocode in the book?
    • Ravi Mohan
      Hi, ... You do need to download the aima-java v 0.92 archive from http://code.google.com/p/aima-java/downloads/list. The file you does not exist is in the
      Message 2 of 5 , Dec 30, 2007
      • 0 Attachment
        Hi,

        --- In aima-talk@yahoogroups.com, "Michael B. Enders"
        <michael.b.enders@...> wrote:
        >
        > I tried to run Java code downloaded for ALPHA-BETA-SEARCH algorithm
        > (figure 6.7) and got message "cannot find class aima.util.Util". I
        > would set the CLASSPATH variable to find the file, except that as far
        > as I know no such file exists on my computer and I need to download
        > it.


        You do need to download the aima-java v 0.92 archive from
        http://code.google.com/p/aima-java/downloads/list.

        The file you "does not exist" is in the directory
        /aima-java/src/aima/util/ the exact path indicated by the error
        message. The error message means you have not set CLASSPATH correctly.

        You don't need to build from source to use the code. Just set your
        CLASSPATH environment variable to the build subdirectory.

        > Can someone tell me how to download whatever files I need to
        > compile and run the Java versions of the pseudocode in the book?

        Instructions to build the java code from source is at
        http://code.google.com/p/aima-java/wiki/ReadMe - look for "Build
        Instructions". A few thousand people have managed to build from these
        instructions. Any problems with building are invariably about not
        setting the classpath correctly.

        If you are not able to make this work, I suggest you ask your local
        system administrator to set up CLASSPATH for you properly, check the
        JRE/JDK version etc.


        Alternatively you could use the codebases from the other
        (python/lisp) implementations, or refer to Paradigms of AI
        programming, as Dr Futrelle suggests, or even write
        your own implementation based on the pseudocode.

        Ivan Villaneuva has a parallel implementation of most of the
        algorithms at http://www.artificialidea.com/index.php?page=algorithms
        which you may want to download and try.

        Regards,
        Ravi
      • Michael B. Enders
        Although you seemed to have missed some of the points in my orginal message, you have answered my question - which is where the files I need to import are
        Message 3 of 5 , Jan 1, 2008
        • 0 Attachment
          Although you seemed to have missed some of the points in my orginal
          message, you have answered my question - which is where the files I
          need to import are located so that I can download them. When I said
          the missing file did not exist, I meant that it did not exist on my
          computer. Until you told me, I did not know that what I needed was in
          the v 0.92 archive. It would have done no good to set the CLASSPATH to
          look for a file in a place on my computer where I knew there was no
          file to import. Until I downloaded and unzipped the archive there was
          not even a path to the file.

          The whole point of my trying to get the Java code was to have something
          to help me understand the pseudocode, and hopefully to use my
          understanding of this pseudocode example to figure out the pseudocode
          later in the book. I think I probably have enough experience with Java
          to follow the logic of the code will have the opportunity to step
          through it with a debugger to help me understand it - and then use the
          Java code to figure out the pseudocode. For the Python and Lisp code
          to help, I would first have to learn Python or Lisp. I understand the
          ALPHA-BETA-SEARCH algorithm, but from sources other than the
          pseudocode; what I am struggling with is trying to understand the
          authors' pseudocode style so I can understand algorithms later in the
          book.
        • Ravi Mohan
          Michael, ... Every distribution ever made of AIMA java has had the requisite files to run every algorithm in that distribution. Nothing special about the 0.92
          Message 4 of 5 , Jan 1, 2008
          • 0 Attachment
            Michael,

            --- In aima-talk@yahoogroups.com, "Michael B. Enders"
            <michael.b.enders@...> wrote:
            >
            > Although you seemed to have missed some of the points in my orginal
            > message, you have answered my question - which is where the files I
            > need to import are located so that I can download them. When I said
            > the missing file did not exist, I meant that it did not exist on my
            > computer. Until you told me, I did not know that what I needed was in
            > the v 0.92 archive.

            Every distribution ever made of AIMA java has had the requisite files
            to run every algorithm in that distribution. Nothing special about
            the 0.92 archive. Once you download the archive and unzip the archive,
            the files are on your computer (needless to say). Otherwise not
            (needless to say). The demo files show usage of particular classes.

            That said, if my message helped, that is good news.

            Regds,
            Ravi
          • Ivan F. Villanueva B.
            ... http://www.artificialidea.com/index.php?page=algorithms Many thanks for the reference ! -- Ivan Villanueva FFII (open standards, no software patents) --
            Message 5 of 5 , Jan 3, 2008
            • 0 Attachment
              On Sun, Dec 30, 2007 10:47:32PM -0000, Ravi Mohan wrote:
              > [...]
              > You do need to download the aima-java v 0.92 archive from
              > http://code.google.com/p/aima-java/downloads/list.
              > [...]
              > Ivan Villaneuva has a parallel implementation of most of the
              > algorithms at
              http://www.artificialidea.com/index.php?page=algorithms

              Many thanks for the reference !

              --
              Ivan Villanueva
              FFII (open standards, no software patents) -- http://www.ffii.org
              FFII.org Deutschland -- https://www.ffii.de
              Jabber: ogai@...
            Your message has been successfully submitted and would be delivered to recipients shortly.