Need help with the pseudocode in this book.
- View SourceI 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.
- View SourceI would strongly suggest that you look at Norvig's book,Artificial Intelligence Programming - Case Studiesin Common Lisp.It is full of insights about these things and has runnablecode in the text and in the downloadable code collection.- Bob FutrelleOn Dec 30, 2007, at 12:09 PM, Michael B. Enders wrote:
- View SourceI 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.
- View SourceI still think that you would find Norvig's book is written in a style that shows youalgorithms 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 anymore elegant. His page 191 shows the arguments are: states, goal-p,successors, and combiner. The latter three are functions passed asarguments. 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 FutrelleOn Jan 1, 2008, at 9:27 AM, Michael B. Enders wrote:
- View SourceOn 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 wouldIf you can read German, the Wikipedia article about it is excellent
> 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.
The English one is not so good but is ok:
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:
Iván F. Villanueva B.