🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

My bot ! [Was : All bots so far...]

Started by
62 comments, last by ToohrVyk 20 years, 10 months ago
Heres the source to my 'DumbBot'. I was just muking around, so it won't be entered!

void DumbBot::Update(){	//Update cycle entry point. Your AI code goes here.	g_pCore->TurnRight(TURN_SLOW);	g_pCore->SetSpeed(SET_NORMAL_SPEED);	if(g_pCore->GetMyHealth() < LastHealth)	{		g_pCore->Taunt("Ouch!");		LastHealth = g_pCore->GetMyHealth();	}	if(g_pCore->GetMyAmmoCount() <= 0)	{		g_pCore->SelectWeapon(WEAPON_COCKTAIL);		g_pCore->SetWeaponAngle(90.0f);	}	else	{		g_pCore->SelectWeapon(WEAPON_GUN);	}	g_pCore->Fire();}


Unfortunatly the taunt doesn't work, but heh.

EDIT: fixed the ouch problem in the code, needed to initialise LastHealth to 100 in the init function "LastHealth = 100;"

-J

[edited by - jason2jason on August 5, 2003 9:57:14 AM]
Advertisement
Another version of my bot is uploaded here.

That version has a 4-to-1 win ratio against the previous version. I managed (or did I?) to eliminate the bot''s nasty habit of stopping in front of trees while looking for directions, it now predicts the position of the enemy when shooting, is more accurate collison-wise, takes into account the long-range inaccuracy of the yellow laser gun, has a higher rate of fire, selects strafe direction to maximize evading (when it doesn''t get stuck, DOH!), etc... etc...

Yet, you should have a lot of fun watching my bot artfully avoiding taking sight of his opponent ("What? I got hit? Never mind, I''ll keep walking straight" and "He''s hidden behind that grass blade, I can''t see him!" are common behavior).

Please upload your bots too so I can see how mine acts against others!

ToohrVyk

Out of 4 games so far your origanal devious bot has won them all! Is this really an improvment?

good effot,

-J

hmmm, that bot has a hard time hitting my bot. Maybe your predictions are off or something (maybe my evasive patterns).

I ran 12 matches and yours unfortunately won only once. I can see much improvement over the previous one though (no more counter based strafeing). Since the previous ''Devious'' was so close to my own and winning 50% of the time, I tuned my bot to hunt for your bot so in the end mine had a 100% kill ratio against your previous bot.

I dunno, maybe my bot is just tuned to hunt for yours.


Good work though, that bot actually looks smart. I''ll give you more feedback when I see something and I might upload my bot sometime (so you can test for yourself).
Guess what? I was predicting movement in the wrong direction :-p

Seriously, I downloaded Leftie (the new version, that works) and tweaked the bot some more. A new verison is available at the same address.

Things added include:
- Idle guard : if the player is looking at an enemy but doesn't fire for a duration, it will ignore the enemy for a time. This is to avoid getting stuck behind a tree, from where you see but can't hit.
- Debug taunts that indicate current state.
- A little better prediction in certain cases (won't try to predict if the enemy is oscillating quickly, for instance), but not perfect yet.

My main issue: if the enemy is behind my bot and a tree, my bot suddenly loses sight of it. As a result, it stops shooting and looks for an insivible foe that's still nailing it down - usually moving straight toward it...

You can mail me your DLL, I should be able to upload it on my web site...

EDIT : that address shouldn't have been "Devious.zîp"

ToohrVyk



[edited by - ToohrVyk on August 5, 2003 1:10:10 PM]
quote: Original post by ToohrVyk
Seriously, I downloaded Leftie (the new version, that works) and tweaked the bot some more.


Your bot seems to be pretty smart Is the Leftie bot you mention avalible for download somewhere? Until i get a bot written battles are a little one sided against SampleBot...
I think Leftie is available for download from here.

hmmm, much improved over 1.6

My bot still seems to win when they just attack each other back and forth (altough much damage is done by yours).

If your bot sees my bot first then it can do a good 30 health damage before my bot finds yours. That prediction seems to be fixed now.

I need to code prediction into my bot fast


btw, love the taunt animations

Time to release my bot... Woodbot


btw. if someone needs a place for his bot... just send it to me and I''ll upload it to my ftp-server...

if there is enough request for it I could add a directory where you can upload your bot''s to the server yourself...
Call me incompetant, but damn those bots are tough! I was using the UserControl method to get keyboard control over a bot and didn''t seem to be able to win a single one

Seems like as soon as you''re spotted then you''ll be locked onto sharpish, and once that happens its pretty much impossible to escape from the bots LOS. So they keep firing constantly, getting glance shots every so often and gradually whittle you down.

Hmm.. perhaps a slower movement when firing or weapon kick back would be a good addition?

This topic is closed to new replies.

Advertisement