Tuesday, April 28, 2009

*bzr* under the firewall

BZR could not work well now in the intranet that has an firewall. I am working behind the firewall. I have to use the http proxy to access networking. There are some problems when I use the bzr, a distributed version control system tool which used in opencog.

The first problem is that it could not use the *lp:opencog*. When I used 'bzr branch lp:opencog' it give me a 'connection time out ERROR', even though I set the http_proxy enviroment correctly. After asking this question in the IRC channel of #bzr at freenode, I got the answer that the bzr is not supported the *lp:opencog* by using the http_proxy now . I should replace it with the URL of opencog trunk . So I used 'bzr branch http://bazaar.launchpad.net/~opencog-dev/opencog/trunk/' to make a local branch instead of using 'bzr branch lp:opencog' and it worked.

The second problem is that I could not use'bzr push lp:~xiaohui/opencog/moses' to push it to my branch of opencog on the lannchpad. So I changed it to
'bzr push https://bazaar.lauchpad.net/~xiaohui/opencog/moses' , but it also could not work. After discussing in the #bzr IRC and googling it. I know the reason is that bzr use the SSH to connect to launchpad. And my SSH could not connect to the networking because I am behind the firewall. So I need a proxy like http proxy or SOCKS proxy for SSH. After setting the proxy for SSH(it will be mentioned later) correctly, and then I use the command
'
bzr push bzr+ssh://bazaar.lauchpad.net/~xiaohui/opencog/moses' to push it to the my branch for my gsoc project correctly.

There are some ways to set the proxy for the SSH, I was followed this link to set the ssh
through http_proxy by using corkscrew. And there also some other method to set the SSH proxy, the following links maybe useful for it.

1. using tsocks to tunnel
http://www.plenz.com/tunnel-everything
2. using connect.c to tunnel
http://bent.latency.net/bent/darcs/goto-san-connect-1.85/src/connect.html

Monday, April 20, 2009

Accepted!!!

I am so excited that my proposal was accepted by opencog. It means that I could spend my summer time to play with the opencog.It is really cool and meaningful, I like it .

From the beginning of April, I was very busy doing my mater projects . During these time, I have write the third patch of MOSES, but it has some bugs. I don't have enough time to fix it.Some days later, Bogdan submited the same patch of gen-mixed-table and it works well(Thanks ,Bogdan).

The next stage I need to do is following the schedule in my proposal . This is the Stage I. It should be finished before starting coding .
  1. Keep learning boost
  2. Reading the papers about MOSES, BBHC, and SAA, to master this algorithm
  3. Reading the document of Opencog and MOSES
  4. 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.

Wednesday, April 1, 2009

The second patch for MOSES

Today , I've finished the second patch, which is to generate a truth table complete or partial. After the first patch , it is easier to finish the second one.

In these two days , except for doing the school things , I spent the most of my time on reading the code of comboreduct and moses. And now , I have a general impression of them. I know how the combo program are stored and the basic datasturture and algorithm.

In the coming days, I plan to do the third patch about the mixed-table generation , to profile how moses works in detail and then to learn how to integrate the bbhc to moses.

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.