Artificial Intelligence Depot
Visiting guest. Why not sign in?
News, knowledge and discussion for the AI enthusiast.
FEATURES COMMUNITY KNOWLEDGE SEARCH  
Genetic Programming : An Introduction
Imagine a world in which computers program other computers based on strategies borrowed from biology and natural selection. The book explores such fascinating possibilities thanks to AI!
More information at Amazon US UK

Reply to Message

Not registered yet?

The AI Depot has a focused community of friendly users. Rather than let anyone abuse the site at the brink of promiscuity, we prefer to let only those with an active interest participate... this simply requires registering.

Why not sign up!

Joining the site's community is completely free. You can then post messages freely, and customise your personal profile at will. Specific privileges will also be granted to you, like being able to access printer-friendly articles without restrictions. So, why not register?

Username:
Password:
Subject:
Email me when someone replies.
Body:

Parent Message

Q3 Bot

We are several here to want tot realize a QIII bot in wich we can plug our AI methods. I propose in this thread to study 2 things :
- How to interface AI code (in a lib) with Q3 engine
- What are the functions Q3 provides and what do they do
All remarks are welcome

7 posts.
Thursday 23 May, 07:20
Reply
Navigation functions

The source code of Q3 seems to contain a lot of navigation functions, which seem to be of high level like. They can be found in be_ai_move.h file. Their code is in fact not present in the distribution. These functions seems to command the pathfinder :
- Move to a goal with BotMoveToGoal
- Move in a direction with BotMoveInDirection
- Avoid a place with BotAddAvoidSpot
- General movestate functions
It should be really interesting to test these functions in a bot !
Some higher level functions can be found in ai_demq3.c. These functions use the precedent ones to manage the bot behavior (choose weapon, attack, navigate). They can be modified for minor changes...

7 posts.
Thursday 23 May, 07:33
Reply
Bot movestate

In my opinion, you have to do this first :
-Alloc a move state with BotAllocMoveState
-Initialize this movestate with BotInitMoveState
Then you can use other functions. For example BotAddAvoidSpot add an area to avoid during the compiutation of your path (this is done for you by the main engine of Q3). You have to specify :
-the movestate you want to modify (cf the one you create)
-the center coordinates of the area you want to avoid
-the radius of this area
-the type of action you want to use on this area :
// avoid spot types
#define AVOID_CLEAR 0 //clear all avoid spots
#define AVOID_ALWAYS 1 //avoid always
#define AVOID_DONTBLOCK 2 //never totally block
If you have any information...

7 posts.
Tuesday 04 June, 04:30
Reply
Interface code with Q3 for a new bot

I am not sure and have not tested this yet. But after studying the source code, I think it is possible to create a new bot. To do this we need to create a neww entity class and modify some settings to tell the game it is a bot.
I would like to know what these settings are, and if this solution seems correct. Someone has any idea ?

7 posts.
Thursday 23 May, 07:36
Reply
Compile with a lib

I have tried to compile the game code with a lib of my own. The compiler used by Q3 has some major limitations :
- no class
- no default value (void function(int nb = 0) for example)
- no ref argument (void function(int &nb) for example)
So I expurged my include file from these errors, and the core game dll seems to compile including my lib (already compiled) which contains C++ code interfaced with simple C functions. I need a basic bot framework to test if it really works, but I do not know exactly how to do this...
Any remarks, ideas ?

7 posts.
Thursday 23 May, 07:45
Reply
Framework

Why the 4 messages?? hehe ;)

It seems to me you need (and are having trouble getting) a basic bot in the game that does nothing, apart from existing.

I believe the existing bot framework does this. I've only taken a quick look, but it's definitely possible! You should take a look at how the existing bots are inserted.

Once you've done this, you could extend it by applying a simple think procedure to it, which has already been done somewhere in the code.

You can also remove the navigation as you see fit, or use the existing AAS code.

I'm going to be looking into Q3 in the near future, I'll let you know when I have something working!

935 posts.
Sunday 26 May, 15:38
Reply

Back to the Artificial Intelligence Depot.