Useful math for AI: MLCP

Useful math for AI: MLCP

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Useful math for AI: MLCP

Post by jcnossen »

I recently came across an area of math research, linear programming and mixed linear complementarity problems, that seems useful for almost anything, yet it is not very well known (Probably because it contains lots of scary math). AFAIK in game coding only physics engines use it (such as ODE).
It might be useful for implementing the kind of decisions that are required in spring AI (for example: assigning construction units to build tasks).

It's basically extended matrix algebra: There you usually are solving a linear system in the form of Ax = b, but with MLCPs you can have additional constraints on the system such as inequalities, or quadratic terms (known as quadratic programming)

I remember from JCAI that I tried to solve such problems with the usual methods (IE: just start coding and try to take all the factors into account), but I usually failed at that ;)

Once you have a good structure set up the equations for the solver, you can basically use the solver everywhere and focus on building a good AI decision model and collecting information for your model.

Another advantage of using a very generic solver method is that you can make your entire AI multithreaded by making your solver multithreaded (Although right now I have no idea if thats actually feasable)

Chris Hecker has done a presentation about it which is downloadable: http://chrishecker.com/The_Mixed_Linear ... ty_Problem

The presentation is pretty useful to see the advantages of LCPs, but after that comes a shitload of math that needs be learned (Which I'm trying to do now).

Online books:
http://www.princeton.edu/~rvdb/LPbook/onlinebook.pdf
http://ioe.engin.umich.edu/people/fac/b ... y_webbook/

EDIT: Another idea, this lends itself well for having one fast C++ solver and a flexible lua based AI that just sets up the equations.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Re: Useful math for AI: MLCP

Post by Dragon45 »

That's my uni... i could pay that prof a visit once school starts again =]
Post Reply

Return to “AI”