Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / A.I tutorials?

Author
Message
Lucifer
19
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 13th Aug 2006 05:47
I have been searching forever for this! maybe i have been searching in the wrong places but i have found absolutely no tutorials about a.i? can anyone point me to a webpage with tutorials?

Tíhí..
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 13th Aug 2006 07:01 Edited at: 13th Aug 2006 07:01
AI is basically just a long sequence of if-then-elses. More realistic AI will have more conditions to check against. Of course some AI can learn for itself, but that's way beyond the scope of any AI used in games. As far as DB programs are concerned, AI is just a long list of conditions and actions.

You do not always have to choose the same actions, they can be random to create less predictable AI.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 13th Aug 2006 11:08 Edited at: 13th Aug 2006 11:12
Hi Lucifer,

There are a lot of articles on AI on the internet. It's a complex topic. My advice would be to decide what you want your AI to do. If you can map it out on paper and actually verbalize the actions, you're on your way to filling those actions with code. It helps a lot to have a visual, whether a drawing or a chart.

Here's a website to take a look at: http://www.gameai.com/pathfinding.html

Take a look at some of the example code in this link from the Code Snippets Forum. It may have information that is helpful to you.
http://forum.thegamecreators.com/?m=forum_view&t=62127&b=6

At one point it was thought that a chess program could never beat a skilled human player because it couldn't be designed to think abstractly. Funny thing is, it doesn't have to. With your average PC today, a chess program's AI will basically be "brute force" which means it goes through as many combinations of positions as it can in any given situation. This isn't a design based on mimicking behavior, but a design in mathematics and sorting. The computer sets weights on the moves based on a predicted outcome and chooses the best one. The only real strategy the program uses is the evaluation of what move has a higher weight.

If you want an object to react to another object in a 3d game, you most likely wouldn't approach it with the "brute force" method, where you would be calculating all possible permutations - but you might instead have an area defined in your game, that if the player object moves into it, a monster will jump out. Then based on the distance between the player and the monster, the monster might follow the player object until it's close enough to attack. If the player distances themself far enough away, the monster goes back to it's hiding place.

If your doing a text adventure type thing, that would basically be a big data base whose entry's are triggered by keyword command combinations.

Enjoy your day.
Lucifer
19
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 13th Aug 2006 18:00
thanks a lot...

Tíhí..

Login to post a reply

Server time is: 2025-05-25 06:29:25
Your offset time is: 2025-05-25 06:29:25