After doing some Prolog programming for a while, there are some useful advanced Prolog techniques. First, tail recursion is very powerful. With the tail recursion it allows the Prolog compiler can optimize code without having to save the pointer for backtracking.  This is useful since it does not build the stack with up and crash the program with stack overflow errors.

Second, the conversion of complex structures into a list using the Univ operator.  I have worked with some complex data structures in my agent code for the blocks world program.  By converting the data structure into a list, it was easy to process the required functors.  Then upon process completion, the list was converted back to a data structure.

As part of my ongoing agent training, I re-read the agent environment algorithm in Chapter 2 of AIMA (Russell and Norvig, 1995). The key challenge is how to convert an algorithm with repeat and for loops into viable Prolog code. At first inspection, the implementation is best suited for a language with control loops built into the programming language (e.g., LISP). My primary Prolog books [Bratko 1990] and [Sterling and Shapiro 1994] did not provide the required help. However, upon rereading Prolog Programming In Depth (Covington, Nute, and Vellino 1997), I was able to figure out how to write loops.

Read More »

In order to understand the RRL paper better, I began to review the blocks world.  So I went back to review [Luger & Stubblefield 1993] on the discussions on the blocks world.  It was mostly used to illustrate propositional and predicate calculus.  In addition, there was a section on robotic planning using the frame problem and STRIPS as tools.  I reviewed the code base for robotic planning written in prolog.  So I began to enumerate all the possible states in the three blocks world.  Afterwards, I designed an test on how to move from an initial state to goal state.  I wrote the initial state, the action, the next state, etc. until the goal state was achieved.  Indeed, this was very simple for three blocks.

Read More »

In this month, I continued my studies in Relational Reinforcement Learning by reviewing the article Towards Informed Reinforcement Learning from the proceedings of the 2004 Machine Learning workshop of Relational Reinforcement Learning.   Basically the articles summarizes that an agent with limited information can find an optimal policy and can achieve a goal or goal states with limited information about its environment.  The experiments reported seems to suggest this type of exploration is possible.  According to Google Scholar search, there are 11 subsequent articles that reference this one.  In the RRL arena, my goal is to repeat the block’s world experiment as reported in Relational Reinforcement Learning article by Dzeroski, De Raedt, and Blockeel.

Read More »

This month marks my first year in utilizing wordpress to host my blog.  It has been a great journey so far and hopefully will be better this coming year.

The month of September has been busy.  Unfortunately I did not write any blog entries due to my busy schedule.  However, from statistical point of view, my blog had the second highest total of number of views (362 in total).  Also, I covered various topics this month with Probability and Statistics, Bayesian Inference, Reinforcement Learning, and finally a LISP review.

I started to review the Reinforcement Learning book (Sutton and Barto 1997) only reading Part 1 and part of Part 2.  I did download the lisp code associated with the book.  I ran the tic-tac-toe program in my test environment.

Read More »

During the month of August, I focused on Relational Reinforcement Learning, a field that combines Relational Learning and Reinforcement Learning fields.  Please read my blog entry for Relational Reinforcement Learning.  Afterwards, I have read a number of different articles regarding RRL learning from different authors, including the RRL workshop at the ICML 2004 conference.  My initial preference is the work performed and researched by Dr. Eduardo F. Morales.

I posted my review and comments regarding part I of the book The Art of Prolog (Sterling and Shapiro 1994).  There are very few books regarding Logic Programming in recent years.  Since the mid 1990s, much of the effort in Logic Programming has been with Inductive Logic Programming and Relational Learning.  The emerging field of Statistical Relational Learning has become a new field of research.  Read More »

I finally completed the Summer Schools in Logic and Learning (SSLL 09) video lecture for Reinforcement Learning presented by Scott Sanner.  It was a good introduction into Reinforcement Learning.  It is a six part lecture.  Plan for time to watch the videos.  He starts with an introduction into the topic.  Next is model based solutions with Markov Decision Process (MDP) and dynamic programming (DP) with value iteration and policy iteration.  The Bellman equations are introduced.  Lastly, he reviews model free approaches from Chapters 5, 6, and 7 of the Reinforcement Learning: An Introduction (Sutton and Barto 1998).  He covers Monte Carlo and Temporal Difference (TD) algorithms, in particular TD lamdba and SARSA.  However due to large state spaces of problems, he discussion function approximators (both linear and nonlinear) along with gradient descend approaches.  A worth while video lecture.

As part of my follow research to my paper, I did some preliminary research for the Warnsdorf’s algorithm for finding knight’s tours.  I found three relevant papers on the subject (Pohl 1967, Pohl-Stockmeyer 2004, and Ganzfried 2004).  Basically, the Warnsdorf algorithm is to traverse the path with least degree.  In the case of a tie, the a path is randomly selected.  In reality, the Warnsdorf algorithm is not consistently successful as pointed out by (Ganzfried 2004).  The (Ganzfried 2004) paper modifies the Warnsdorf algorithm with key squares in which the move order changes, which improves finding knight tours.  The next step is generate a prolog program using the Pohl-Warnsdorf and Ganzfried algorithms.

The book The Art of Prolog (Sterling and Shapiro 1994) is an excellent treatise in the subject of Logic Programming and Prolog.  The book is divided into four parts – Logic Programming, The Prolog Language, Advance Prolog Programming Techniques, and Applications.

Beginning with Logic Programming, chapter one provides the best introduction into Logic Programming as well as the first definition of the abstract interpreter for logic programming.  The definitons for term, functor, compound term, clause or rules, logic programs, and the meaning for logic programs are presented.  The summary is worth reading.

Read More »

I start this month reading the articles in Relational Reinforcement Learning.  It began as a curiosity due to a response in the Reinforcement Learning mailing list.  The authors point a speech by Rich Sutton and Leslie Pack Kaelbling at the IJCAI 1997 conference in Japan, in which they recommended the combination of Induction Logic Programming (aka Relational Learning) and Reinforcement Learning.  The authors of the paper demonstrate this concept by using the blocks world domain to illustrate the combination of both fields.  Perhaps, this is exactly what I needed since I have done much reading, studying, and video lectures with logic programming, ILP, and reinforcement learning.  Of course, this paper spawn much researching according to CiteSeerX and Google Scholarly.

I found the web site to the 2004 Workshop in Relational Reinforcement Learning and downloaded the proceedings.

I shall continue this path of research interest.