Has anyone written any code where the application in its lifetime learn and improve itself (using observed data stored in a KB),are there any frameworks for this?
I would suggest starting to look at alot of advanced AI topics on the web: such topics include neural networks, genetic programming ect (wikipedia them).
Good places to look also include University research into higher levels of AI. (ie. I know of a team of people that wrote a program which extrapolated the laws of motion from making a computer watch a pendulum swing with a camera; very cool stuff) http://blog.wired.com/wiredscience/2009/04/newtonai.html
It is a really big field and alot of code will need to be written by you; what you should really focus on is the concepts behind the learning algorithms, that way you can program or adapt the ones you find to your needs. I think that will be your best bet for creating a learning algorithm.
I hope that helps.
I wrote a learning Tic Tac Toe
(or Noughts and Crosses
) game once. Does that count?
It basically maintained a 39 element array which was for each game state. At the end of each game, it would add one to all the states during that game if it had won. Or subtract one if it had lost (including rotations and mirror images for faster learning).
When deciding on a move, it only had to consult a few possibilities and choose the one with the highest score.
It ended up getting quite good but not by playing a person, that was taking too long. It had to be set loose playing another copy of itself, a random bot and a hard-coded rule bot for many, many thousands of games.
When I unleashed it, it had 10 starting levels of intelligence which were just different stages during its learning process.
My son is currently playing against the dumbest level - he's only four years old so I don't want to be too rough on him, so they'll learn together (although he occasionally beats me at Connect Four
, so maybe I should put some more pressure on him).
Your question is IMHO very broad. Most Spam filters will fit your description. But in general your approach will depend on what the application has to learn and how it should learn. Spam filters for example usually do supervised learning. But if you don't want the user to help your application learning you would have to go with unsupervised learning methods. Of course there are more choices to make. mloss.org has a lot of libraries with ML algorithms that you could use. But for most of the libraries it is helpful if you know at least roughly how their algorithms work.
The best is you read an some books on Machine Learning (like Mitchell's Machine Learning) and AI.
This previous post lists some standard text books, of which I highly recommend Artificial Intelligence a Modern Approach (AIMA) by Russel/Norvig.
Of the many available toolkits I suggest to take a look at Orange, SciPy (both Python) or Weka (Java).