Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: To Do AI, You Need Lots Of Knowledge, And A Way To Select The Right Bit!

Author: Graham Laight

Date: 05:57:21 07/20/00

Go up one level in this thread


On July 20, 2000 at 08:22:57, Ed Schröder wrote:

>On July 20, 2000 at 06:56:59, Graham Laight wrote:
>
>>On July 20, 2000 at 02:38:07, Ed Schröder wrote:
>>
>>>On July 19, 2000 at 18:36:28, Graham Laight wrote:
>>>
>>>>On July 19, 2000 at 15:02:14, Amir Ban wrote:
>>>>
>>>>>On July 19, 2000 at 11:06:13, Alvaro Polo wrote:
>>>>
>>>>>>I'll believe that adding new knowledge to Junior is almost free. I have then two
>>>>>>questions.
>>>>>>
>>>>>>1.- Why isn't then Junior's evaluation much better? Please don't misunderstand
>>>>>>me. I am sure it has a great evaluation but, one may think that when things are
>>>>>>almost free you could just add any bit of knowledge that you might consider
>>>>>>useful under any circumstance and have a really astounding, hypergreat, out of
>>>>>>this world evaluation.
>>>>>>
>>>>>
>>>>>Because the problem is not writing evaluation terms but deciding which one's are
>>>>>right or formulating them correctly. Not to mention giving them correct weight.
>>>>>
>>>>>I don't know where many posters in this newsgroup get the idea that "knowledge"
>>>>>in chess is obvious and it's just a matter of coding it. In fact the opposite is
>>>>>true: the *true* and *correct* rules of evaluation ar more like a hidden mystery
>>>>>that programmers look for like the mathematicians looked for the proof of
>>>>>Fermat's theorem. I can easily add 20 new elements to my evaluation, but I
>>>>>expect 19 of them will prove to be wrong, or (what amounts to the same thing),
>>>>>badly tuned.
>>>>>
>>>>>The best way to become familiar with this problem is to write a chess program.
>>>>
>>>>I've seen programmers complain about this problem before. They also complain
>>>>that they apply knowledge to fix a problem in one type of position, and it plays
>>>>worse in another type of position.
>>>>
>>>>I've long believed that the solution is to be more systematic in the creation,
>>>>storage, and selection of knowledge.
>>>>
>>>>I'm afraid I'm not going to write a chess program in the forseeable future, but
>>>>here's my idea to store knowledge systematically, then address the problem of
>>>>getting to the right knowledge in the right positions:
>>>>
>>>>* write a large number of evaluation functions (eval fn), and store them in a
>>>>database (db) so that they can be managed and maintained (one eval fn per db
>>>>record)
>>>>
>>>>* for each record, as well as the eval fn, also store some "indexes" to indicate
>>>>the type of position where this eval fn will be useful
>>>>
>>>>* generate a chess position to evaluate (we're playing a game now)
>>>>
>>>>* compare this position with the indexes of the eval fns, creating a
>>>>(percentage?) match value between each eval fn, and the present position
>>>>
>>>>* sort the eval fns into order of match value, and pick the best matching eval
>>>>fns
>>>>
>>>>* apply each of the selected eval fns to the present position, weighting them
>>>>according to their match value
>>>>
>>>>* do all this with some sort of "in memory" database with fast APIs, and do some
>>>>tricks with the database indexing, so that it can all be done quickly in "real
>>>>time" (I can post a web site of a product that can do this, if anyone is
>>>>interested).
>>>>
>>>>I hope this stimulates further discussion - I personally think that this is a
>>>>very important issue. After all - we're trying to do "Artificial Intelligence"
>>>>here - and you can't really be intelligent without having both plenty of
>>>>knowledge, and the ability to select the right sliver of that knowledge for the
>>>>present circumstances.
>>>>
>>>>-g
>>>
>>>You are missing some main points which Amir explained quite well. I will
>>>give a very simple example about one of the main problems implementing
>>>new chess knowledge.
>>>
>>>Suppose you are adding new chess knowledge concerning rook moblity on open
>>>files. It will have effect on all the other chess knowledge you have written
>>>once before. You for instance will get unwanted side effects concerning pawn
>>>structure, king safety etc. Unwanted negative side effects can be: a) the
>>>engine will accept double pawns too easy because the rook wants to have
>>>the open file b) making unsound moves regarding king safety as open rook
>>>file is rewarded too high in respect to king safety.
>>>
>>>The opposite is also true for (a) and (b). Often a position requires to
>>>accept the weakness of a double pawn, often a position requires an open
>>>rook file above king safety.
>>>
>>>This is just one of the simple cases. CC is not about just coding new chess
>>>knowledge (that is the most easy part) but how it correlates with all the
>>>other stuff you have. And the more you have the more difficult it becomes
>>>to add new chess knowledge because of these unwanted side effects. If you
>>>for instance forget to check (test) chess knowledge you have programmed 5
>>>years ago if it still correlates with the new stuff and it doest not correlate
>>>you end-up with a program that is weaker without realizing it (for years).
>>>
>>>The main problem of adding new chess knowledge is the correlation between
>>>all the chess knowledge you have and your suggested database system will
>>>have the same trouble.
>>>
>>>Ed
>>
>>I have to disagree STRONGLY with this assessment of my idea!!!
>>
>>The problem you are describing is the classic problem of "knowledge management"
>>when you have a huge amount of knowledge. My thinking is explicitly designed to
>>address this very issue.
>>
>>I'll admit right now that there is a maintenance problem with my scenario, that
>>I quietly neglected to mention: every time you realise that you need new indexes
>>in your knowledge db, you are going to have to "retro-fit" those indexes to all
>>the knowledge records in the database that you already have. That's a
>>maintenance problem which I haven't conceptually solved, yet. Even though this
>>is "model" chess program, not a "real" one, I'd be interested to hear if anyone
>>has any ideas about this.
>>
>>However, when it comes to keeping the knowledge under control, well organised,
>>maintainable, and selected for use on just the right occasion, my idea is the
>>tops! (imho)
>
>Weighting is a matter of practise, playing games and then notice the
>thousands and thousands exceptions. Just do yourself a favor and write
>a QBASIC or JAVA program (easy to learn) and then get the shock of your
>life after you have gone through the initial trouble (an engine that
>plays legal chess only) and experience the exceptions till you can't
>stand it any longer pick a hammer and smash the thing that is torturing
>you into the number of pieces of exceptions you have noticed. Then write
>a posting in CCC with the header, "You are all idiots" to those who we
>usually call chess programmers here.

We're not getting a little bit upset here, are we?  :)

Actually, the serious point I want to make in reply to your paragraph above is
that the whole point of my idea is to address the very issue that knowledge is
all about "exceptions".

If a few simple, generalised rules could give you appropriate behaviour in
almost every situation, there would be no point in us having large brains, and
evolution would not have given them to us.

My design (above) is all about getting to the RIGHT piece of knowledge at the
RIGHT time.

Steadily, as you build the knowledge database, you'll get to the point where you
know as many "exceptions" as a (good) human player.

In short - my plan is based on the view that the "exceptions" are the most
important thing - and we must have a method of getting to them!

>Don't you think programmers don't have a system as you describe? Of course
>they have only that they have other names for it (data-structure, (pre-
>computed) tables, structures).

Unfortunately, there tends to be too much discussion of searching methods in
CCC, and not enough (especially at a high level) about how to manage the
knowledge in the evaluation. However, I suspect that my idea goes much further
in both easing the burden of building knowledge in a methodical way, and in
terms of maintaining it - both the old and the new.

Also, as far as I know, I'm the first person to suggest using a third party
database product with good APIs for storing evaluation knowledge, so that the
programmer can have a substantial chunk of the work of building this system (and
a lot of good, built in features like searching, viewing and sorting)already
done for them.

>I think you really overestimate the possibilities of a computer. A computer
>is a stupid device that knows nothing, it can not learn (like we) unless you
>teach it, it can't recognize even the most simple pattern (like we), all it
>is able to is add / subtract / move data / compare data and do that 100-500
>million times a second without making a mistake. That's all you have as a
>starting point.

I disagree. You can buy good database products, for example. What you've said in
the above paragraph is like saying that when you teach a child, all you've got
is 10^11 neurons as a starting point. Fortunately, humans have a significant
amount of pre-programmed ability to learn.

If you want a computer to be able to learn without having to program it
yourself, there are products you can buy to do that as well.

This is the 21st century. You don't have to do it all yourself anymore!
Collaboration will enable us all to achieve more...

-g

>Ed
>
>
>>For every piece of knowledge, because it is in a database, you could search for
>>it in many ways. Without losing anything in the game, you could even categorise
>>the db records (e.g. category level 1 = pawn structure, king safety, etc,
>>category level 2 would be a list of records pertaining to king safety, etc).
>>
>>If I did build this system, I would certainly include a good text description
>>for each knowledge record in the db, and a short, concise title.
>>
>>Best of all, when you want to know what's happening with your eval in a
>>particular position, you've got a ready made function which will list the
>>knowledge records the system is going to use in the eval, ordered by their
>>weightings!
>>
>>You'd also be able to see, also in order of weighting, those knowledge records
>>that didn't quite make it into the eval.
>>
>>What could be better than that?
>>
>>Do you really believe that my ideas have nothing to contribute to the knowledge
>>management problem?
>>
>>-g



This page took 0.02 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.