Is this project a good way to learn AI programming?

Started by
4 comments, last by AngleWyrm 10 years, 8 months ago

I'm excited about learning some AI programming. I'm interested in AI in general but right now I just want to get my feet wet with some game AI an eventually get pretty good at it. I have a fun project in mind that would really motvate me to learn but I don't know if it is a viable way to learn or if it is to difficult for a beginner, I don't wanna end up getting in over my head and not being able to learn anything.

My plan is to make a little 2d 'game' where theres just one level - a simple 2d arena - and 2(maybe more but I'll start with 2 for simplicity) 'heroes' on the level. It'll be coded in such a way that heroes can be controlled by various AI brains or by player input. The heroes will have different action-rpg like abilities(actually I'll probably end up basing their abilities mostly on World of Warcraft/League of Legends). It won't be an actual game, more of a sandbox, where the 2 heroes just fight eachother. Either player vs AI or AI vs AI. I want to program everything to the point where its all working smoothly and I have a nice little interface to program my brains into and I can try out different techniques on different heroes and test them out against eachother or against myself in arena combat. I'll probably start out simple with a basic finite state machine and different preprogrammed behavoirs for each state, but eventually want to try out more advanced and fun techniques

My question is if this sounds like a good way to learn AI? Is it too hard for a beginner, is there a better way, etc... The main appeal to me is that it will be fun which wil lmotivate me to learn a lot

thanks

Advertisement

I think it's a bit too much for beginners. Deciding which skills to use, maintaining the right distance, when to fight and retreat, etc is actually quite complex.

Here's some few AI exercises I think can be good for beginners:

1. Tic Tac Toe - FSM and min-max tree.

2. Boss battles - If you notice, boss battles typically have patterns that players must figure out. Boss does A, then B, and if condition X is satisfied, then C. The pattern repeats, and may adjust depending on player's condition. This is good exercise for FSM.

3. Then, I think you would have enough experience necessary to start coding a LoL arena matchup :)

Arena fighting has many varieties. The most suitable one for AI is represented by games like C Robots: weak and straightforward attacks, simple movement and limited sensors, requiring basic tasks that are grounded in real world robotics (exploration, motion planning, shooting moving targets, etc.) rather than learning idiosyncratic strategies for specific move sets.

Omae Wa Mou Shindeiru

Path finding will be your biggest problem, in my experience. There's also an application called 'Robocode' that is made specifically for testing your AI skills. You battle robots, and test your robots against other robots that have been created.

http://robocode.sourceforge.net/

Depending on how much supporting coding is taken care of already (allowing you to get to the behavior part your are interested in for AI)...

For the different skills/tactices you WANT to do the state machine HIERARCHICALLY - having seperate sub-state machines for the different tactics (very similar ones can share). The more numerous and more intertwined the states get, the uglier they are to debug. The hierarchical method does allow for 'dropping thru' for default handling of a state which can shrink the individual state machines significantly (cutting out NUL cases from each one or standard state EXIT handlers)

Path finding in an arena should be no problem (and there are plenty of code examples to implement that popular AI subject)

Start out with some very basic moves/counters so you can see how complex the state machines have to be (and what processing might be generalized) before laying large numbers of tactics which might have to be rewritten as you discover importanty bits they all require (like a sudden discovery that the individual states have to be broken into smaller steps)

--------------------------------------------[size="1"]Ratings are Opinion, not Fact
The main appeal to me is that it will be fun which wil lmotivate me to learn a lot
A major contributor to my feeling of "fun" is success. The "IT WORKS!" experience is quite motivating for me. So when choosing a project, I would plan small bite-size pieces that will give me a lot of those level-ups.
--"I'm not at home right now, but" = lights on, but no ones home

This topic is closed to new replies.

Advertisement