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

Need help with the pseudocode in this book.

Expand Messages
  • Michael B. Enders
    I am finding the pseudocode in the text almost no help at all and would appreciate it if someone could help me with it. For example, I think I understand how
    Message 1 of 5 , Dec 30, 2007
    View Source
    • 0 Attachment
      I am finding the pseudocode in the text almost no help at all and would
      appreciate it if someone could help me with it. For example, I think I
      understand how the ALPHA-BETA-SEARCH algorithm that is described in
      figure 6.7 works, but my understanding of the algorithm comes from
      sources other than the pseudocode. If someone could do a virtual step-
      though of the code (as if using a debugger) using the example in figure
      6.5 (or another example if it is easier), I might be able to get used
      to the pseudocode style of the authors and interpret the later
      pseudocode examples. I don't understand what the variables a and s
      represent. As I get deeper into the book, I am finding myself more and
      more frustrated because of not understanding the pseudocode examples.
    • Bob Futrelle
      I would strongly suggest that you look at Norvig s book, Artificial Intelligence Programming - Case Studies in Common Lisp. It is full of insights about these
      Message 2 of 5 , Dec 30, 2007
      View Source
      • 0 Attachment
        I would strongly suggest that you look at Norvig's book, 
        Artificial Intelligence Programming - Case Studies
        in Common Lisp.

        It is full of insights about these things and has runnable
        code in the text and in the downloadable code collection.

         - Bob Futrelle

        On Dec 30, 2007, at 12:09 PM, Michael B. Enders wrote:

        I am finding the pseudocode in the text almost no help at all and would 
        appreciate it if someone could help me with it. For example, I think I 
        understand how the ALPHA-BETA-SEARCH algorithm that is described in 
        figure 6.7 works, but my understanding of the algorithm comes from 
        sources other than the pseudocode. If someone could do a virtual step-
        though of the code (as if using a debugger) using the example in figure 
        6.5 (or another example if it is easier), I might be able to get used 
        to the pseudocode style of the authors and interpret the later 
        pseudocode examples. I don't understand what the variables a and s 
        represent. As I get deeper into the book, I am finding myself more and 
        more frustrated because of not understanding the pseudocode examples.


      • Michael B. Enders
        I will keep that in mind, but at this point my strategy for trying to figure out the pseudocode is to get some of the algorithms that are in pseudocode in the
        Message 3 of 5 , Jan 1, 2008
        View Source
        • 0 Attachment
          I will keep that in mind, but at this point my strategy for trying to
          figure out the pseudocode is to get some of the algorithms that are in
          pseudocode in the book in Java, because I some experience with Java and
          none with Lisp or Python. For some reason, I find the authors'
          pseudocode style to be almost impossible to understand - even when I
          find out how the algorithms work from other sources. I figure that if
          I compare the pseudocode versions of the algorithm with version in a
          language that I am more familiar with, I will finally be able to
          understand the pseudocode style. If I look at examples in Lisp then I
          am dealing with two languages I don't understand instead of one.
        • Bob Futrelle
          I still think that you would find Norvig s book is written in a style that shows you algorithms stripped to their essence, yet they are fully executable code.
          Message 4 of 5 , Jan 1, 2008
          View Source
          • 0 Attachment
            I still think that you would find Norvig's book is written in a style that shows you
            algorithms stripped to their essence, yet they are fully executable code.

            You would soon learn how close Lisp is to the *ideas*.

            The way he defines and then builds on tree-search could hardly be any
            more elegant. His page 191 shows the arguments are: states, goal-p,
            successors, and combiner. The latter three are functions passed as 
            arguments.  Successors is simply a list.  

            It's nine lines of code plus two lines of comments,  
            plus the variety of search strategies  he presents in the rest of Sec. 6.4,
            all built on tree-search by using appropriate variants of the three functions.

             - Bob Futrelle



            On Jan 1, 2008, at 9:27 AM, Michael B. Enders wrote:

            I will keep that in mind, but at this point my strategy for trying to 
            figure out the pseudocode is to get some of the algorithms that are in 
            pseudocode in the book in Java, because I some experience with Java and 
            none with Lisp or Python. For some reason, I find the authors' 
            pseudocode style to be almost impossible to understand - even when I 
            find out how the algorithms work from other sources. I figure that if 
            I compare the pseudocode versions of the algorithm with version in a 
            language that I am more familiar with, I will finally be able to 
            understand the pseudocode style. If I look at examples in Lisp then I 
            am dealing with two languages I don't understand instead of one.


          • Ivan F. Villanueva B.
            ... If you can read German, the Wikipedia article about it is excellent http://de.wikipedia.org/wiki/Alpha-Beta-Suche The English one is not so good but is ok:
            Message 5 of 5 , Jan 3, 2008
            View Source
            • 0 Attachment
              On Sun, Dec 30, 2007 05:09:19PM -0000, Michael B. Enders wrote:
              > I am finding the pseudocode in the text almost no help at all and would
              > appreciate it if someone could help me with it. For example, I think I
              > understand how the ALPHA-BETA-SEARCH algorithm that is described in
              > figure 6.7 works, but my understanding of the algorithm comes from
              > sources other than the pseudocode.

              If you can read German, the Wikipedia article about it is excellent
              http://de.wikipedia.org/wiki/Alpha-Beta-Suche

              The English one is not so good but is ok:
              http://en.wikipedia.org/wiki/Alpha-beta_pruning

              Same for many other algorithms.

              And remember that you are not allowed (copyright) to copy the text or anything
              else in traditional books for you own texts, but you have a copyleft license
              on the Wikipedia pages. E.g. for the English one:

              http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License

              --
              Iván F. Villanueva B.
            Your message has been successfully submitted and would be delivered to recipients shortly.