Jump to content

AI programming


link123

Recommended Posts

if you can just find ai theory it wouldnt be hard coming up with your own ai for games or chat progs

Link to comment
Share on other sites

  • 2 weeks later...
if, tons and tons of ifs.

Actually, far from it.

There's more than one AI paradigm, but there is something that skims through every time.

What you have to understand, is that AI is no different that any other kind of application. You have input, and you try to get output. The kind of input and output will vary greatly from say, you're average GUI program, but only in the way your data is interpreted.

Saying you want to code AI is actually extremely broad. There's AI as in language (a talking bot), or AI as in movement (having a robot move around the room), but again, it's always the same thing. Understanding what you have to do next.

The usual structure of a game is:

while (running)
{

    while (event = eventsToBeTreated())
        onEvent(event);

    onLoop();

    if (needsRendering)
        onRender();

}

And AI is not so different.

while (alive)
{

    while (event = eventsToBeTreated())
        onEvent(event);

    onLoop();

    if (needsAction)
        onAction();   

}

The biggest part after that, is of course to understand what kind of events you're waiting for. How to interpret them. Spending some time designing the event detection is extremely important. The action, in the end, is fairly straightforward, but it only is any good if you've detected your input correctly.

Link to comment
Share on other sites

  • 2 weeks later...

AI is extremely vast, you need to look at what you want to do first. Then choose the right tool for the job. C++ might be ok for somethings but you'll want a Logic language for some of the more advanced AI principles, such as resolution and planning. Something like Prolog would be great as lots of people use it for just that.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...