I need some tutorials that explain more complex methods of programming artificial intelligence broken down into simpler terms.
Or something that take steps and eases you into artificial intelligence.
Whatever.
It really all depends on what kind of "artificial intelligence" you're imagining when you talk about an AI. For example, a game AI that moves an enemy sprite continually towards a player sprite is not even in the same universe as a general-purpose natural language conversant AI. From the context, it sounds like you're talking about a conversational AI rather than a game AI, but I'm not too sure. Can you clarify what you mean exactly? If you want to learn about all kinds of AI writing, you're probably better off starting with fundamentals of machine learning and pattern recognition, dealing with linear classifiers and perceptrons, some general neural networks, Bayesian decision mechanisms, convolutional neural networks, and some NLP stuff, but I bet most of that is outside the scope of your current math background. Wink
I'm just talking about the basis for a game AI to be implemented on the calc.
^^ That
Again, Raylin, you have to be specific. What do you want the game to be able to do (specifically)? There are different algorithms and techniques for all kinds of things. There's not just one magical "make the program smart" pill that you can take; but depending on what you want to do, there are things you can do. Do you want something to chase, to predict moves, to navigate through a maze, to solve something...? (and even then, you might need to be specific)
shkaboinka wrote:
Again, Raylin, you have to be specific. What do you want the game to be able to do (specifically)? There are different algorithms and techniques for all kinds of things. There's not just one magical "make the program smart" pill that you can take; but depending on what you want to do, there are things you can do. Do you want something to chase, to predict moves, to navigate through a maze, to solve something...? (and even then, you might need to be specific)
Exactly this. I'd say one good rule of thumb for an AI is "try to think like a player, think of strategies a player would use, and then code that", but that's only a very high-level vague suggestion. In order to be more specific, we need more specifics from you.
Okay.
I want the enemy to chase the player but I don't want it to be so stupid that if you hid behind a wall, it tries to go through it.
Well, that seems to be a bit of a mix of Pathfinding and just some simple comparison statements. For the most part, you could just see if PlayerX < EnemyX, and subtract one from the enemy X, etc. Then if the enemy seems to come across a barrier wall, use a pathfinding algorithm (start by maybe reading a simple version here: http://en.wikipedia.org/wiki/Pathfinding#Sample_algorithm ) to find the way; once the player is in sight again (basically, if there are no blocked ways between a direct sloped-path between the player and the enemy) use the simple comparison actions to move.

In a nutshell, that's a way to think about something like that; that's how I would code it, at least (and if I were the enemy, I would do that -- it's efficient).
Well-said, Ashbad. I think it's better to just code the simple pathfinding algorithm to begin with and not bother with the move-towards portion of the code, since the pathfinder reduces to that trivial algorithm in an absence of intervening walls. Make sure you understand the algorithm before you implement it, though; otherwise you're just doing code monkey work. Smile
KermMartian wrote:
Well-said, Ashbad. I think it's better to just code the simple pathfinding algorithm to begin with and not bother with the move-towards portion of the code, since the pathfinder reduces to that trivial algorithm in an absence of intervening walls. Make sure you understand the algorithm before you implement it, though; otherwise you're just doing code monkey work. Smile


Good point actually, Kerm, I just realized after you having said this that the trivial comparison form would possibly set up the enemy to get stuck in a position where pathfinding would be necessary to get out of being stuck. Pathfinding on its own would be best, Kerm is right.
Cheers, Ashbad. Now we just need Raylin to get the motivation to write this without us writing the whole program for it, like what happened with Raylin and the Cemetech contest. Sad
I found a pathfinding tut somewhere on the web, lemme look it up...
EDIT: http://www.policyalmanac.org/games/aStarTutorial.htm
aeTIos wrote:
I found a pathfinding tut somewhere on the web, lemme look it up...
EDIT: http://www.policyalmanac.org/games/aStarTutorial.htm
I was going to scoff that that was basically what the Wikipedia page had already explained, but that's a very thorough tutorial indeed. Thanks for sharing!
I saw it the day before yesterday. now it is the case that I am starting to get the basic grasps of AI, so I read the whole thing. Its pretty easy to code I think.
aeTIos wrote:
I saw it the day before yesterday. now it is the case that I am starting to get the basic grasps of AI, so I read the whole thing. Its pretty easy to code I think.
Sounds like perhaps you should try writing a little game with it yourself in order to cement the understanding into your brain. Smile
I am already playing a bit with some code for a platformer with AI.
I could indeed write some pathfinding program. maybe something like PacMan or so (doesnt that use pathfinding for the ghosts?)
aeTIos wrote:
I am already playing a bit with some code for a platformer with AI.
I could indeed write some pathfinding program. maybe something like PacMan or so (doesnt that use pathfinding for the ghosts?)


I think the original PacMan uses a slightly primitive pathfinding system, yes. It doesn't use a direct-find, shortest-path one, however, due to the narrow pathways and fast moving gameplay. I believe the ghosts only check where to go based on how far away you are and in what general direction, every time they get to a hallway intersection.
I remember reading a book with a lot of A* in it... It was very interesting, as it had a lot of stuff on game theory and such. I'll see if I can dig it up.
That sounds like an interesting read, Seana11. Ashbad, I'm not completely convinced that PacMan used such a simplistic AI, but it definitely didn't use something too complex.
In pacman, the ghosts also try to trap you. They can go faster than you, but they can't corner as well, so they move around on the long pathways, and then trap you in the little curvy bits.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement