Archived

This topic is now archived and is closed to further replies.

Making an Agent

This topic is 5601 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, I just started getting into the AI thang. I was reading a article in a DirectX book and the graphics that were displayed were by FSMs. So I looked on Google and ran into tons of AI sites. Most of them trying to explain a little about FSM and how they can be used. Little did I know I''v been using them all the time. So I thought I would try and create some sort of FSM agent that had a special purpose. I want to get to know the frame work first. I have had no luck finding any good articles that explain good algorithms for putting peacing together the frame work for a Agent (FSM). What I want is some good info on designing a system. What type of classes, structures and methods of C++ that should be used. The type of AI I need to make is somthing pretty basic for now. I want it to be able react off sertain thangs in its enviorment. I want some basic attack knolage and thats about it for now. Later I want to add a learning system. Witch I heard most of this stuff can be based all of a FSM. This is something I just came up with. Its just a laout of thangs. I want to code a good frame work and layout. So then I have something to build off of.
  

enum STATE { DEAD, ALIVE, THINK };



while( 1 )
{
    if( ::PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
    {
	::TranslateMessage( &msg );
	::DispatchMessage( &msg );

	if( msg.message == WM_QUIT )
            break;
    }
    else
    if( s != DEAD )
    {
	// AI process( es )

	// Finite State Machine

	switch( s )
	{
	    case ALIVE:
	    break;
	    
            case THINK:
	    break;
	}
	// End process

    }
}

  
I wanted to get a FSM framework setup like the ones in QUAKEs. Because I like they way they work from what I''v head. Those type of algorythms is what I''m talking about.

Share this post


Link to post
Share on other sites