How to design the artificial intelligence of a fighting game (Street Fighter or Soul Calibur)? - artificial-intelligence

There are many papers about ranged combat artificial intelligences, like Killzones's (see this paper), or Halo. But I've not been able to find much about a fighting IA except for this work, which uses neural networs to learn how to fight, which is not exactly what I'm looking for.
Occidental AI in games is heavily focused on FPS, it seems! Does anyone know which techniques are used to implement a decent fighting AI? Hierarchical Finite State Machines? Decision Trees? They could end up being pretty predictable.

In our research labs, we are using AI planning technology for games. AI Planning is used by NASA to build semi-autonomous robots. Planning can produce less predictable behavior than state machines, but planning is a highly complex problem, that is, solving planning problems has a huge computational complexity.
AI Planning is an old but interesting field. Particularly for gaming only recently people have started using planning to run their engines. The expressiveness is still limited in the current implementations, but in theory the expressiveness is limited "only by our imagination".
Russel and Norvig have devoted 4 chapters on AI Planning in their book on Artificial Intelligence. Other related terms you might be interested in are: Markov Decision Processes, Bayesian Networks. These topics are also provided sufficient exposure in this book.
If you are looking for some ready-made engine to easily start using, I guess using AI Planning would be a gross overkill. I don't know of any AI Planning engine for games but we are developing one. If you are interested in the long term, we can talk separately about it.

You seem to know already the techniques for planning and executing. Another thing that you need to do is predict the opponent's next move and maximize the expected reward of your response. I wrote a blog article about this: http://www.masterbaboon.com/2009/05/my-ai-reads-your-mind-and-kicks-your-ass-part-2/ and http://www.masterbaboon.com/2009/09/my-ai-reads-your-mind-extensions-part-3/ . The game I consider is very simple, but I think the main ideas from Bayesian decision theory might be useful for your project.

I have reverse engineered the routines related to the AI subsystem within the Street Figher II series of games. It does not incorporate any of the techniques mentioned above. It is entirely reactive and involves no planning, learning or goals. Interestingly, there is no "technique weight" system that you mention, either. They don't use global weights for decisions to decide the frequency of attack versus block, for example. When taking apart the routines related to how "difficulty" is made to seem to increase, I did expect to find something like that. Alas, it relates to a number of smaller decisions that could potentially affect those ratios in an emergent way.

Another route to consider is the so called Ghost AI as described here & here. As the name suggests you basically extract rules from actual game play, first paper does it offline and the second extends the methodology for online real time learning.
Check out also the guy's webpage, there are a number of other papers on fighting games that are interesting.

http://www.ice.ci.ritsumei.ac.jp/~ftgaic/index-R.html
its old but here are some examples

Related

AI for MMORTS game

I'm not sure if this is the right place to ask this, but here goes.
I have been a programmer for about 12 years now with experience in php, java, c#, vb.net and asp. I have always been rather intrigued about Artificial Intelligence. I think it is really the ultimate challenge for any developer.
I have written many simple scripts to play games but nothing compared to what I want to do next. I want to write an AI program that will play a MMORTSG (Massively Multiplayer Online Real Time Strategy Game. I have been searching through many AI techniques but none seem to tackle the problems that I know I will face:
Problems I can foresee:
The game has no "win situation", instead, the best strategy is the one that has the greatest growth in comparison to that of other players. Growth is determined by 3 factors, economy, military and research.
Parts of the game state are unpredictable. Other players can attack me at random.
The game is time based and actions take time. ie. Building a new building make take several hours. While that building is being built, no other buildings can be built.
All the AI systems I have researched, require some sort of "Winning Function" to test if the AI has found an end. Where in my situation it would more likely be something like "I have X, Y, Z options, the best one is X".
ps. Sample code would be awesome. Even Psuedo would be great.
I've seen a few applications of Artificial Intelligence in the Gaming area, but most of this was for FPS, MMORPGs and RTS games. The genre type that you appear to be relating to sounds similar to 'Clash of Clans', where research, military and economy as well as random attacks occur over a random period of time, and runs over an endless period of time.
It seems that a model would be used at key points in the game (building is finished, or research is available, or castle is full) to make strategic decisions for progression. Perhaps a Genetic Algorithm could be applied at key moments determine a suitable sequence of future steps. A modular neural network could be defined to decide the logical Growth factor to take, but training such a network may be difficult as the game rules can change over time (either from previously unknown resources, research options, military and even game updates). Scripts are quite common as well in the MMORPG genre, but defining the manual rules could also be difficult without knowing all of the available options. The fact is that there are so many ways that your challenge can be addressed that it would be difficult to give a clear-cut answer to your problem, let alone the code or psudocode.
Looking briefly over the problem, it appears that the contributing factors to the problem would be current economic state, current military state, current research state, time lost if saving for next upgrade, time required to build next upgrade, cost of upgrade as well as other unknown factors.
Given that the problem has no clear winning objectives, I guess it is a matter of maintaining a healthy balance between the three growth factors. But how does one define the balance? Is research more important? Should you always have money, or just save enough for the next planned upgrade? Should military be as large as possible?
The challenge that you are placing before yourself is quite adventurous, but I would recommend taking on smaller challenges if you are not yet familiar with the models that AI have to provide. There are quite a number of Gaming Applications for AI resources available to inspire your model (including ziggystar's examples noted above).

Where can I get very simple inroduction to all Artificial intelligent techniques with Real world Examples

I know that Artificial Intelligence field is very vast and there are many books on it. But i just want to know the any resource where i can get the simple inroduction to all Artificail Intelligence techniques like
It would like to have 1 or 2 page introduction of all techniques and their examples of how they can be applied or for what purpose they can be used. I am interested in
Backpropagation Algoritm
Hebbs Law
Bayesian networks
Markov Chain Models
Simulated Annealing
Tabu Search
Genetic Algorithms or Evolutionary Algos
Now there are many variants and more AI techniques. And each one have many books written on them. i am unable to decide which algos i can use unless i know what they are capable of doing.
So can i find 1-2 page inroduction of them with Application examples
Essentials of Metaheuristics covers several of these - I can't promise it'll cover all of them, but I know there's good stuff on simulated annealing and genetic algorithms in there. Probably at least a few of the others, but I'd have to re-download it to check. It's available for free download.
It can be a bit light on the theory, but it'll give you a straightforward description, some explanation of when you'd want to use each, and a lot of useful pseudocode.
Here's an image on local search (= tabu search without tabu) from the Drools Planner manual:
I am working on similar images for Greedy algorithms, brute force, branch and bound and simulated annealing.
As an example of Genetic Algorithms implementation I can give you this.
It's an API I developed for GA, with one implementation for each operator, and one concrete example problem solved ((good) Soccer Team among ~600 players with budget restriction). Its all setup so you run it with mvn exec:java and watch it evolving in the console output. But you can implement your own problem structure, or even other operators (crossing, mutating, selection) methods.

classical AI, ontology, machine learning, bayesian

I'm starting to study machine learning and bayesian inference applied to computer vision and affective computing.
If I understand right, there is a big discussion between
classical IA, ontology, semantic web researchers
and machine learning and bayesian guys
I think it is usually referred as strong AI vs weak AI related also to philosophical issues like functional psychology (brain as black box set) and cognitive psychology (theory of mind, mirror neuron), but this is not the point in a programming forum like this.
I'd like to understand the differences between the two points of view. Ideally, answers will reference examples and academic papers where one approach get good results and the other fails. I am also interested in the historical trends: why approaches fell out of favour and a newer approaches began to rise up. For example, I know that Bayesian inference is computationally intractable, problem in NP, and that's why for a long time probabilistic models was not favoured in information technology world. However, they've began to rise up in econometrics.
I think you have got several ideas mixed up together. It's true that there is a distinction that gets drawn between rule-based and probabilistic approaches to 'AI' tasks, however it has nothing to do with strong or weak AI, very little to do with psychology and it's not nearly as clear cut as being a battle between two opposing sides. Also, I think saying Bayesian inference was not used in computer science because inference is NP complete in general is a bit misleading. That result often doesn't matter that much in practice and most machine learning algorithms don't do real Bayesian inference anyway.
Having said all that, the history of Natural Language Processing went from rule-based systems in the 80s and early 90s to machine learning systems up to the present day. Look at the history of the MUC conferences to see the early approaches to information extraction task. Compare that with the current state-of-the-art in named entity recognition and parsing (the ACL wiki is a good source for this) which are all based on machine learning methods.
As far as specific references, I doubt you'll find anyone writing an academic paper that says 'statistical systems are better than rule-based systems' because it's often very hard to make a definite statement like that. A quick Google for 'statistical vs. rule based' yields papers like this which looks at machine translation and recommends using both approaches, according to their strengths and weaknesses. I think you'll find that this is pretty typical of academic papers. The only thing I've read that really makes a stand on the issue is 'The Unreasonable Effectiveness of Data' which is a good read.
As for the "rule-based" vs. " probabilistic" thing you can go for the classic book by Judea Pearl - "Probabilistic Reasoning in Intelligent Systems. Pearl writes very biased towards what he calls "intensional systems" which is basically the counter-part to rule-based stuff. I think this book is what set off the whole probabilistic thing in AI (you can also argue the time was due, but then it was THE book of that time).
I think machine-learning is a different story (though it's nearer to probabilistic AI than to logics).

looking for a good project to work on as my graduation project in the university that involves Ai / Machine Learning, please help me

I need help to chose a project to work on for my master graduation, The project must involve Ai / Machine learning or Business intelegence.. but if there is any other suggestion out of these topics it is Ok, please help me.
One of the most rapid growing areas in AI today is Computer Vision. There are many practical needs where the results of your Master Thesis can be helpful. You can try research something like Emotion Detection, Eye-Tracking, etc.
An appropriate work for a MS in CS in any good University can highlight the current status of research on this field, compare different approaches and algorithms. As a practical part, it makes also a lot of fun when your program recognizes your mood properly :)
Netflix
If you want to work more on non trivial datasets (not google size, but not trivial either and with real application), with an objective measure of success, why not working on the netflix challenge (the first one) ? You can get all the data for free, you have many papers on it, as well as pretty good way to compare your results vs other peoples (since everyone used exactly the same dataset, and it was not so easy to "cheat", contrary to what happens quite often in the academic literature). While not trivial in size, you can work on it with only one computer (assuming it is recent enough), and depending on the type of algorithms you are using, you can implement them in a language which is not C/C++, at least for prototyping (for example, I could get decent results doing things entirely in python).
Bonus point, it passes the "family" test: easy to tell your parents what you are working on, which is always a pain in my experience :)
Music-related tasks
A bit more original: something that is both cool, not trivial but not too complicated in data handling is anything around music, like music genre recognition (classical / electronic / jazz / etc...). You would need to know about signal processing as well, though - I would not advise it if you cannot get easy access to professors who know about the topic.
I can use the same answer I used on a previous, similar question:
Russ Greiner has a great list of project topics for his machine learning course, so that's a great place to start.
Both GAs and ANNs are learners/classifiers. So I ask you the question, what is an interesting "thing" to learn? Maybe it's:
Detecting cancer
Predicting the outcome between two sports teams
Filtering spam
Detecting faces
Reading text (OCR)
Playing a game
The sky is the limit, really!
Since it has a business tie in - given some input set determine probable business fraud from the input (something the SEC seems challenged in doing). We now have several examples (Madoff and others). Or a system to estimate investment risk (there are lots of such systems apparently but were any accurate in the case of Lehman for example).
A starting point might be the Chen book Genetic Algorithms and Genetic Programming in Computational Finance.
Here's an AAAI writeup of an award to the National Association of Securities Dealers for a system thatmonitors NASDAQ insider trading.
Many great answers posted already, but I wanted to add my 2 cents.There is one hot topic in which big companies all around are investing lots of resources into, and is still a very challenging topic with lots of potential: Automated detection of fake news.
This is even more relevant nowadays where most of us are connecting though social media and there's a huge crisis looming over.
Fake news, content removal, source reliability... The problem is huge and very exciting. It is as I said challenging as it can be seen from many perspectives (from analising images to detect fakes using adversarial netwotks to detecting fake written news based on text content (NLP) or using graph theory to find sources) and the possbilities for a research proyect are endless.
I suggest you read some general articles (e.g this or this) or have a look at research articles from the last couple of years (a quick google seach will throw you a lot of related stuff).
I wish I had the opportunity of starting over a project based on this topic. I think it's going to be of the upmost relevance in the next few years.

Less Mathematical Approaches to Machine Learning?

Out of curiosity, I've been reading up a bit on the field of Machine Learning, and I'm surprised at the amount of computation and mathematics involved. One book I'm reading through uses advanced concepts such as Ring Theory and PDEs (note: the only thing I know about PDEs is that they use that funny looking character). This strikes me as odd considering that mathematics itself is a hard thing to "learn."
Are there any branches of Machine Learning that use different approaches?
I would think that a approaches relying more on logic, memory, construction of unfounded assumptions, and over-generalizations would be a better way to go, since that seems more like the way animals think. Animals don't (explicitly) calculate probabilities and statistics; at least as far as I know.
The behaviour of the neurons in our brains is very complex, and requires some heavy duty math to model. So, yes we do calculate extremely complex math, but it's done in a way that we don't perceive.
I don't know whether the math you typically find in A.I. research is entirely due to the complexity of the natural neural systems being modelled. It may also be due, in part, to heuristic techniques that don't even attempt to model the mind (e.g., using convolution filters to recognise shapes).
If you want to avoid the math but do AI like stuff, you can always stick to simpler models. In 90% of the time, the simpler models will be good enough for real world problems.
I don't know of a track of AI that is completely decoupled from math though. Probability theory is the tool for handling uncertainty which plays a major role in AI. So even if there was not-so-mathematical subfield, math techniques would most be a way to improve on those methods. And thus the mathematics would be back in game. Even simple techniques like the naive Bayes and decision trees can be used without a lot of math, but the real understanding comes only through it.
Machine learning is very math heavy. It is sometimes said to be close to "computational statistics", with a little more focus on the computational side. You might want to check out "Collective Intelligence" by O'Reilly, though. I hear they have a good collection of ML techniques without math too hard.
You might find evolutionary computing approaches to machine learning a little less front-loaded with heavy-duty maths, approaches such as ant-colony optimisation or swarm intelligence.
I think you should put to one side, if you hold it as your question kind of suggests you do, the view that machine learning is trying to simulate what goes on in the brains of animals (including Homo Sapiens). A lot of the maths in modern machine learning arises from its basis in pattern recognition and matching; some of it comes from attempts to represent what is learnt as quasi-mathematical statements; some of it comes from the need to use statistical methods to compare different algorithms and approaches. And some of it comes because some of the leading practitioners come from scientific and mathematical backgrounds rather than computer science backgrounds, and they bring their toolset with them when they come.
And I'm very surprised that you are suprised that machine learning involves a lot of computation since the long history of AI has proven that it is extremely difficult to build machines which (seem to) think.
I've been thinking about this kind of stuff a lot lately.
Unfortunately, most engineer/mathematician types are so tied to their own familiar mathematical/computational worlds, they often forget to consider other paradigms.
Artists, for example, often think of the world in a very fluid way, usually untethered by mathematical models. Much of what happens in art is archetypal or symbolic, and often doesn't follow any seemingly conventional logical arrangement. There are, of course, very strong exceptions to this. Music, for instance, especially in music theory, often requires strong left brained processes and so forth. In truth, I would argue that even the most right brained activities are not devoid of left logic, but rather are more complex mathematical paradigms, like chaos theory is to the beauty of fractals. So the cross-over from left to right and back again is not a schism, but a symbiotic coupling. Humans utilize both sides of the brain.
Lately I've been thinking about a more artful representational approach to math and machine language -- even in a banal world of ones and zeroes. The world has been thinking about machine language in terms of familiar mathematical, numeric, and alphabetic conventions for a fairly long time now, and it's not exactly easy to realign the cosmos. Yet in a way, it happens naturally. Wikis, wysisygs, drafting tools, photo and sound editors, blogging tools, and so forth, all these tools do the heavy mathematical and machine code lifting behind the scenes to make for a more artful end experience for the user.
But we rarely think of doing the same lifting for coders themselves. To be sure, code is symbolic, by its very nature, lingual. But I think it is possible to turn the whole thing on its head, and adopt a visual approach. What this would look like is anyone's guess, but in a way we see it everywhere as the whole world of machine learning is abstracted more and more over time. As machines become more and more complex and can do more and more sophisticated things, there is a basic necessity to abstract and simplify those very processes, for ease of use, design, architecture, development, and...you name it.
That all said, I do not believe machines will ever learn anything on their own without human input. But that is another debate, as to the character of religion, God, science, and the universe.
I attended a course in machine-learning last semester. The cognitive science chair at our university is very interested in symbolic machine learning (That's the stuff without mathematics or statistics ;o)). I can recommend two outstanding textbooks:
Machine Learning (Thomas Mitchell)
Artificial Intelligence: A Modern Approach (Russel and Norvig)
The first one is more focused on machine learning, but its very compact has got a very gentle learning curve. The second one is a very interesting read with many historical informations.
These two titles should give you a good overview (All aspects of machine learning not just symbolic approaches), so that you can decide for yourself which aspect you want to focus on.
Basically there is always mathematics involved but I find symbolic machine learning easier to start with because the ideas behind most approaches are often amazingly simple.
Mathematics is simply a tool in machine learning. Knowing the maths enables one to efficiently approach the modelled problems at hand. Of course it might be possible to brute force one's way through, but usually this would come with the expense of lessened understanding of the basic principles involved.
So, pick up a maths book, study the topics until it you're familiar with the concepts. No mechanical engineer is going to design a bridge without understanding the basic maths behind the system behaviour; why should this be any different in the area of machine learning?
There is a lot of stuff in Machine Learning, outside just the math..
You can build the most amazing probabilistic model using a ton of math, but fail because you aren't extracting the right features from the data (which might often require domain insight) or are having trouble figuring out what your model is failing on a particular dataset (which requires you to have a high-level understanding of what the data is giving, and what the model needs).
Without the math, you cannot build new complicated ML models by yourself, but you sure can play with existing tried-and-tested ones to analyze information and do cool things.
You still need some math knowledge to interpret the results the model gives you, but this is usually a lot easier than having to build these models on your own.
Try playing with http://www.cs.waikato.ac.nz/ml/weka/ and http://mallet.cs.umass.edu/ .. The former comes with all the standard ML algorithms along with a lot of amazing features that enable you to visualize your data and pre/post-process it to get good results.
Yes, machine learning research is now dominated by researchers trying to solve the classification problem: given positive/negative examples in an n-dimensional space, what is the best n-dimensional shape that captures the positive ones.
Another approach is taken by case-based reasoning (or case-based learning) where deduction is used alongside induction. The idea is that your program starts with a lot of knowledge about the world (say, it understands Newtonian physics) and then you show it some positive examples of the desired behavior (say, here is how the robot should kick the ball under these circumstances) then the program uses these together to extrapolate the desired behavior to all circumstances. Sort of...
firstly cased based AI, symbolic AI are all theories.. There are very few projects that have employed them in a sucessfull manner. Nowadays AI is Machine Learning. And even neural nets are also a core element in ML, which uses a gradient based optimization. U wanna do Machine learning, Linear Algebra, Optimization, etc is a must..

Resources