Important Dates

Currently Online

Latest Posts

Topic: Artificial artificial intelligence. ;)

ixprefect
Joined: 2009-02-27, 14:28
Posts: 367
Ranking
Tribe Member
Posted at: 2010-06-01, 17:01

Are your experiments available somewhere? That would be very interesting.

Why do you say that "destroy lumberjack when you need wheat" is a bogus rules if there are human players that actually use this rule during play? I would say that the fact that a human player did this proves that the rule is not bogus. It is precisely because of those corner cases (need space to build the farms) that learning from human players is interesting.

Yes, I expect the data set required by such an AI to become rather large over time. I would say that that's to be expected.

Random note: Creating a distance measure based on covariances is not a new idea, I found today that this is known as the Mahalanobis distance.


Top Quote
hulagutten
Joined: 2009-07-19, 21:34
Posts: 56
Ranking
Likes to be here
Posted at: 2010-06-01, 21:05

Tino! Thanks a lot for the debug build. I am using it now and it is several TIMES faster to make the AAi using your build. Thanks again!


Top Quote
hulagutten
Joined: 2009-07-19, 21:34
Posts: 56
Ranking
Likes to be here
Posted at: 2010-06-01, 21:20

The reason why "destroy lumberjack when you need wheat" is bogus is that it is missing the crucial information about this only being true if there is a lack of space. Obviously, it can be a horrible strategy if applied generally. The problem is then if the AI starts to create new rules to compensate for this horrible strategy.

The best result of my experiments was lack of success. One of my attempts was to get Python to figure out the grammar of Python and solve a problem, which was to set x to y times 4. Python has an Exec command, which will execute any Python code placed in a string and the program was to come up with a program to create such code. I utilized simulated evolution to try to achieve this. I provided the AI with a dictionary of with lots of valid python words so it did not have to start attempting all combinations of letters. The AI did actually come up with some strings which was valid Python syntax. The most popular once that I remember were: x = 1 1 > 1

The program ran for a day or so and just produced masses of such bogus, though valid code. It never solved the problem though.

I believe I modified the code so heavily, and in the end I simply gave it up. I do not believe I have any working code from these experiments. You can read about professionals that have attempted this with success in limited fields on http://en.wikipedia.org/wiki/Evolutionary_algorithm.

Edited: 2010-06-01, 21:22

Top Quote
ixprefect
Joined: 2009-02-27, 14:28
Posts: 367
Ranking
Tribe Member
Posted at: 2010-06-02, 11:30

Oh, I misunderstood. I thought you had done experiments with Widelands specifically. It doesn't sound to me like your experiments are applicable at all.

As for the "destroy lumberjack when you need wheat" thing, it seems to me that the problem is not so much with the approach I suggest, but with the selection of stimuli. If the stimuli available to the sampling algorithm includes the number of building places available to the player, then such a dependence could be detected in the same way that the dependence on the amount of wheat could be detected. Also, there will obviously a dependence on the amount of trunks the player has. Considering that wood shortage is one of the most common problems you face in Widelands, I doubt a human player would destroy a lumberjack unless they have a relatively safe supply of wood from other sources. All of this can be taken into account given a wide enough selection of stimuli. (Of course, there are also problems with too many stimuli, such as overfit.)

And yes, I'm aware of evolutionary algorithms and all that, and of their very limited applicability. However, what I have suggested is actually not an evolutionary algorithm, at least not in the classical sense (parts of it may have superficial similarities). In particular, it does not contain the ideas of mutation and recombination, not even really the idea of having "specimens" that are evaluated and selected.

In a way, my suggestion is more "learning with expert advice", though that doesn't fit entirely either since the term is usually associated with the weighted majority algorithm.

Edited: 2010-06-02, 11:31

Top Quote