Tuesday, March 31, 2009

My GSoC Proposal:Improved hBOA by integrating the BBHC and implement the simulated annealing algorithm

Abstract:
MOSES is the cognitive plugin of Opencog Framework, and it plays an important role in the Opencog. The hBOA is used to generate the promising programs as optimal algorithm in MOSES. But it is not the optimal one in this context. Therefore, to improving the efficiency of the optimal algorithm in MOSES is very important and meaningful. The BBHC and simulated annealing algorithm are suitable to be integrated into the MOSES. These integration work would make MOSES better and smarter.


Overview

Opencog is a common platform to build and share the artificial intelligence programs for the research scientists and software developers. And the safety tools and protocols for AGI will be developed, which is a long-term goal. This is a great project can make machine stronger to deal with the complex problems in the complex environments. I am sure that it will be come true with the effort of many contributors. Opencog framework is an infrastructure that provide the stable APIs and libraries. And there are many projects use or communicate with it. Among these projects, the cognitive algorithm MOSES, which attracts me most, is an approach to program evolution, based on the representation-building and probabilistic modeling. I am really interested to do that, if I can do something to let MOSES better/smarter that is a very exciting work.

From the idealist and the mailing list, I knew something about hBOA, which used for generating new collections of knob settings in MOSES. However, it is not the optimal algorithm in this context. So the replacement or improvement of it is especially worthwhile to do. For the reason mentioned above, I am pleasure to contribute to make it better in GSoC by integrating the BBHC into MOSES and implementing the simulated annealing algorithm for MOSES, which can make opencog more powerful.


Tasks and Schedule

During the period of GSoC, the following tasks I consider I will be finished in this summer.

  • Integrate the Building Block Climber Algorithm into MOSES
  • Learn Chenshuo's code about the BBHC Algorithm , refactoring his code and integrate it into the MOSES.
  • Do some research to let BBHC support for **program learning** and integrate it.
  • Use the ant problem as test case to test the BBHC-in-MOSES
  • Write test cases , comments and document.
  • Implement the simulated annealing algorithm and integrated it into MOSES.
  • Do some research on how to use annealing algorithm to **program learning** and implement the prototype and do some experiments to test the algorithm.
  • Integrate the simulated annealing algorithm to MOSES.
  • Use the ant problem as test case to test the annealing algorithm in MOSES
  • Write test cases ,comments and document.

A schedule for finishing these tasks well is definitely necessary. It is list as following. I divided it into three stages:

  • Stage I Learning and Reading stage (now to May 17)
  • Keep learning boost
  • Reading the papers about MOSES, BBHC, and SAA, to master this algorithm
  • Reading the document of Opencog and MOSES
  • Reading the code of MOSES and BBHC and do some little change to the code,like to add the comment of the code with the format of doxygen and patches.
  • Stage II Reading and Coding (May 23 to July 6)
  • Reading papers about BBHC and SAA
  • Writing the test cases and then coding and integrate BBHC to MOSES
  • Stage III Coding and Summary (July 7 to August 24)
  • Write the test case and implement the simulated annealing algorithm
  • Doing some experiment and integrate the code to MOSES
  • Writing the documentation about the project.
  • Stage IV Maintaining (after GSoC 2009)
  • Maintaining the code and join the community


Biography and Experience

I am Xiaohui Liu, a second year graduate student majored in control theory and control engineering in Zhejiang University in Hangzhou, China. My research area is machine learning, pattern recognition and robot vision. My research interesting is mainly machine learning algorithms, like the GA, SVM; I am also interested in the Evolutionary Computation .

I have a good programming experience. I have good knowledge of c/c++, MATLAB. I am also familiar with STL, Java and SDL programming language. Six years have passed since I wrote the program of "Hello! World" used in C. During this time, I have written some interesting programs, which is listed as following:

  • Adaptive GA and Simulation of Flight Simulators Control System Dec.2005 – Mar.2006
  • analysis and designed the control algorithm(AGA) to an flying simulators control system
  • implemented the algorithm using C language and accomplished the GUI by MFC
  • Simple Digital Image Process June 2006 – August 2006
  • studied the basic algorithm of digital image process in a short period
  • implemented the algorithm of digital image process using C++ language
  • achieved the performance of quickly browse and process the images
  • The Measurement System for Impedance of Back Shu Point on Human body based on Machine Vision July 2007 – May 2008
  • participated the overall design of this measurement system and designed the vision subsystem
  • researched and implemented the algorithm of mark recognition and coded the module of serial communication using C++ language
  • wrote the system design document and software design document on each design phrase with classmates
  • The Internship in Nokia Siemens Networks Company(China) July 2008October 2008
  • learned SDL , Python and Java programming language by training
  • learned how to write the unit test case using TNSDLUNIT (extended from CxxTest) and how to develop program through TDD method.
  • Implemented a tool for producing the SQL sentence from the Excel Document in Java

Take the above all projects I have attended into account, the first project and the third one are the most interesting project. I like the algorithm of evolution and the machine vision; it is really cool and smart. It is a great idea to let machine thinking like human and nature. I love evolution algorithm and other intelligence algorithms, that's the reason why I chose improved hBOA as my GSoC project. Through this project, I will have an in-depth understanding of Program Evolution and gain precious and valuable experience of open source. Meanwhile, I am happy to contribute to Opencog especially through helping MOSES better and smarter.

I have to learn some thing to be able to complete the project. The most important thing is to know the theory of MOSES and some algorithm used in the MOSES well. Reading Dr. Moshe’s thesis and the paper about BOA and other algorithm is a good way to understand how MOSES works. This may take much time, so I began some days ago. (Now, I have read the earlier two chapters). Then, another thing I should learn is the boost library. I knew it in last year when I read the source code of QuteCom, which is an open source VoIP softphone. But in that time, I just have a general impression about it; luckily, I decided to learn it in last month. Now, I should keep learning of it and doing some practices. The third thing I need to learn is how to cooperate in an open source community well. I have paid attention to some Open Source project, like OpenCV, QuteCom, and APR in the past time. I often joined the mailing list and to discuss. I have compiled the QuteCom and read the source code roughly and know the architecture. But, it is a pity; I have not attended Opencog project or community before I decide to apply the GSoC project. I know that, there should be more communications, more discussion through the IRC and mailing list. But I know less about the issue and bugs track. The above three things are the necessary for me to learn in order to complete the project well.


Others

In order to do the GSoC project well and contribute to my effort to Opencog community, I am glad to do something good to the Opencog community.

First, I will spend enough time to join the GSoC project. I am willing to hang out on the Opencog IRC channel to communicate to mentors. My nickname is xiaohui or xiaohui_liu. My university term will be end at June 30 and the next term will begin at September 1. During the time from now to summer, I will spend at least 6 hrs per day and at least 3 days per week. In the summer, I believe I can spend five day or at least four days on GSoC project.

Second, I will post the progress of GSoC and some ideas or something else to the opencog wiki or my blog(http://xiaohui-liu.blogspot.com/).each week, so the mentor and everyone could know what state of the project is .Besides, the document should be write completely. I consider I will continue to contribute to the opencog after the GSoC, so the code can be maintained and supported properly. BTW, I am willing to execute CLA.

Another, I am not sure that I will go out for travel to Beijing or not in this summer. Maybe I will be in Beijing in one week or less .I hope that will not be the obstacle of the project. But I am sure that I can spend more time after that if I go for a traveling.

In a word, I am very interested in the project of improved hBOA in MOSES, and I think I am suitable for it. No matter I was accepted or not, I consider it is a great thing to participate to the Opencog

Monday, March 30, 2009

Patch 1 for MOSES

Yesterday , I posted the first patch to the MOSES. It is a contin-table generator that can generator the contin-table used for the combo program.

At the beginning, I really don't know what patch should I sumbit before the accepting day of GSoC.Fortunately, Nil post some suggestions on the mailing list of what patch should made if anyone interested on the MOSES. I knew this is a good chance and followed the instruction provided by Nil --Thank you ,Nil :-) . Then I begin to read the source code and the document of comboreduct. I know a little about the data structure and algorithms of it .

After discussion with Nil, I chose to do the first one in these three patches. It is the simplest after knowing the API of comboreduct, what I need to do is to using these APIs to gernerator the contin-table.

In the coming days, I thought the most important thing is to keep reading Dr. Moshe Looks' s
Ph.d.It is really hard to understand. Now , I have finished the first three chapters. Another important thing is to learn how to use the boost library, Meanwhile , I will continue to write the other patches for the MOSES.

The Opencog is really an interesting project, I love it and I am willing to contribute to it.

Saturday, March 28, 2009

Built Opencog on cygwin

OpenCog aims to provide research scientists and software developers with a common platform to build and share artificial intelligence programs. The long-term goal of OpenCog is acceleration of the development of beneficial AGI, a goal which includes developing tools and protocols for AGI safety.

Now it can be built on the platform of some GNU/LINUX distributions, like Unbuntu/Debian, Fedora,Gentoo,etc. And it is also can be built with Visual Studio, but it can not built on the cygwin now. I think it is very interesting to built it on the cygwin. So I cosider that I could have a try if I have the time.

In the past days, I have built it on the cygwin , but it have lots of errors, the mainly error is the lack of packages . Considering I have to be ready for applying the GSoC, so I decide to delay builting it on the cygwin. In order to build it succesfull on cygwin, the following steps are very necessary:

1. install the dependency packages that the opencog need. If there is not exist on cygwin , I should build the packages from the source on the cygwin first.

2. maybe the opencog's code should be modified to meet the need on the cygwin. so this step is to reading the code and port it to cygwin, which is a huge project for me now.

3. built it on the cygwin, and do the iterative until it successful.

It is really a lot of work to do if it can be built on cygwin. Maybe , I could do that after the GSoC.

PS:
I have built it on my cygwin, and the error log is in my Google Docs , the next step is to install the packages in the coming days.


Wednesday, March 25, 2009

GSoC Application

In these days , I am ready to apply the GSoC project. The most attractive project to me is the improved hBOA from Opencog.

In the past week, I spend most of my time to know the MOSES and Opencog. I'v read Dr Moshe's thesis and the wiki of Opencog. The mailing list and the IRC are the spcace I hang about.

Now, today I was finished the proposal of improved hBOA and send it out and ask for some suggestion.