The Gang Garrison 2 Forum
May 18, 2013, 01:50:48 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Chat with us on IRC: http://ganggarrison.com/irc.html
Server: irc.esper.net, Channel: #gg2
 
   Home   Help Search Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 »
  Print  
Author Topic: Tempest Bot [v5_3]  (Read 35359 times)
Derpduck [LORD]
2011 Haxxy Finalist
*
Offline Offline

Posts: 3529



« Reply #315 on: July 15, 2011, 08:39:59 am »

so are the bots in your server mod
Logged

Orpheon
2011 Haxxy Award Winner
*
Offline Offline

Posts: 5813


Developer


« Reply #316 on: July 15, 2011, 08:50:58 am »

so are the bots in your server mod
Yes.

With commands like addBot that make using them a bit more flexible, and people don't have to choose between bots and hosting options.
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
Floyd Pinkerton
Hero Member
*****
Offline Offline

Posts: 779


Is there anybody out there?


« Reply #317 on: July 15, 2011, 09:00:35 am »

Can the bots have random names?
Logged


Waiting to cut out the deadwood.
LowriderTR[LORD]
Sr. Member
****
Offline Offline

Posts: 478


Ottoman Boy


« Reply #318 on: July 15, 2011, 09:15:02 am »

 Ummm. In ctf_classicwell they're stuck in sniper zone.  z7
Logged


Wanna?
Orpheon
2011 Haxxy Award Winner
*
Offline Offline

Posts: 5813


Developer


« Reply #319 on: July 15, 2011, 09:18:54 am »

Ummm. In ctf_classicwell they're stuck in sniper zone.  z7
Are they jumping?
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
LowriderTR[LORD]
Sr. Member
****
Offline Offline

Posts: 478


Ottoman Boy


« Reply #320 on: July 15, 2011, 09:32:32 am »

 Yes. =/
Logged


Wanna?
Floyd Pinkerton
Hero Member
*****
Offline Offline

Posts: 779


Is there anybody out there?


« Reply #321 on: July 15, 2011, 11:39:38 pm »

Can the bots have random names?
Logged


Waiting to cut out the deadwood.
MTK5012
2011 Haxxy Finalist
*
Offline Offline

Posts: 738


I was Gangsterman


« Reply #322 on: July 16, 2011, 12:43:49 am »

Yes.just change their name in the botcreate script into choose(a,b,c).i might do a name loader plugin if im free.
Logged
Orpheon
2011 Haxxy Award Winner
*
Offline Offline

Posts: 5813


Developer


« Reply #323 on: July 16, 2011, 05:09:51 am »

Do you GMK? If yes, the line you're searching for is in the CreateBot script.
Code:
player.name = "Tempest Bot "+string(global.bot_num)

Replace that with
Code:
player.name = choose(name1, name2, name3, name4, etc...)
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
Floyd Pinkerton
Hero Member
*****
Offline Offline

Posts: 779


Is there anybody out there?


« Reply #324 on: July 16, 2011, 09:04:28 am »

Do you GMK? If yes, the line you're searching for is in the CreateBot script.
Code:
player.name = "Tempest Bot "+string(global.bot_num)

Replace that with
Code:
player.name = choose(name1, name2, name3, name4, etc...)

I don't have the full version.
Logged


Waiting to cut out the deadwood.
Derpduck [LORD]
2011 Haxxy Finalist
*
Offline Offline

Posts: 3529



« Reply #325 on: July 16, 2011, 09:11:37 am »

Do What You Want, Cause A Pirate Is Free... You Are A Pirate
Logged

Gadolinium
Newbie
*
Offline Offline

Posts: 9


« Reply #326 on: July 16, 2011, 10:45:32 am »

I'm not sure how your bot handles spies right now, but I have a few ideas:
A quick search for the word "spy" through the thread seems to indicate that spybots are a bit weak. I'm not sure, but you might find certain situations where people act predictably. For example, terrain with no crates where the enemy is most likely distracted (near their base where they're just rushing forwards), the front and back of crates, ledges that people jump up to, etc. You could then put in code to make the spybot godlike at facestabs (since the computer can perfectly calculate momentum).
There could also be an option to manually put in large amounts of these "trap spots" - have a dictionary of locations to check for specific situations. For example, the jumping-at-a-ledge situation - you could find ledges that people easily get stabbed on, and then say: "If someone is in this general location and jumps in such a way that he will land on this piece of land, get to where he will land and initiate a stab timed so that you kill him when he does." Or "if there are less than three people on this capture point, one of which is not too dangerous for you, get to the top, fall down and jumpstab the more dangerous one, and then shoot the other."

One significant disadvantage of this is that people might start trying to stab you in real life.

EDIT: I looked at the thread again, and people have been saying to solely use the revolver. I'm not sure whether this is because the revolver is the better weapon or because it's better for a bot that isn't so good at stabbing. I mean... do good human infiltrators use the revolver only, or do they stab too? I think they stab, right? So, if you can make it work, I think it would be better to have the infiltrator stab.

I'm thinking that against spies... well, if you're server-side, your bots will have a huge advantage against spies. Spychecking seems simple - fire randomly every few seconds if there's no enemies around, and jump like a mother toucher. And once you find a spy, just follow him and fire, with a chance of "missing" that decays over time, but which is boosted by getting a hit (and being sure where he is again). If you can detect forks in the path, you could also put that in and have large decays there - after all, there's not much difficulty chasing a spy down a long hallway, but once he reaches one staircase up and another down, it gets much harder.

...You might already have this, but it might be useful to put in some variables to calculate the sort of factors that humans think about. For example, maybe instead of saying, "Yo, Infiltrator, stab this guy," you could say, "Yo, Infiltrator, stab this guy unless you don't want to." And the bot balances various things in his head; if it's a Capture the Flag mode, and he knows most people are probably fighting somewhere else (a circle of where you last saw everyone that expands over time for uncertainty?), then he really "wants" to grab the flag and pursue that over other stuff. If it's a Capture Point mode, and he knows one guy is almost going to capture the other point, he's also going to want to do that. If there are enemies, and they are firing, and he can't see friends, he knows they are spychecking so he will be scared to go near them. There could also be a rough matchup/range table, like Spy is weak at close range to the Firebug but a little better at long range and so on (this will include the revolver only and not the knife).

So there might be many variables such as that, and decisions will use them in various ways, with the bot always weighing different decisions with what he was going to do before. For example, if the bot is running around and sees someone, he will start calculating whether it would be profitable for him to stab that guy. The bot takes the close-range matchup value of the guy, which is very large as he is a Heavy. But the Heavy is not firing, so he figures he can kill him and reduces the value by 90%. He also sees a Firebug. However, the Firebug is pretty far away, so he takes the long-range value for the Firebug, and then reduces it further (danger values are equal to the matchup value, plus exponential decay if the unit is farther away than "long-range", e.g. offscreen). The total danger value is low compared to the profitability of stabbing (the Heavy has a high value in the profitable-stabs table, which is even larger because he is standing on a capture point), so the Infiltrator stabs him.

This seems like it would lead to some pretty horrible bugs, like if you have 50v50 on a map where the two teams spawn next to each other and the total "danger value" of each enemy scares the hell out of all the bots, so they stay in their spawn point forever or something. So it might be useful to track the values and be able to output them in a debug mode. This might also require more computation than is feasible, especially with many bots.
« Last Edit: July 16, 2011, 11:08:43 am by Gadolinium » Logged
Orpheon
2011 Haxxy Award Winner
*
Offline Offline

Posts: 5813


Developer


« Reply #327 on: July 16, 2011, 11:17:36 am »

I'm not sure how your bot handles spies right now, but I have a few ideas:
A quick search for the word "spy" through the thread seems to indicate that spybots are a bit weak. I'm not sure, but you might find certain situations where people act predictably. For example, terrain with no crates where the enemy is most likely distracted (near their base where they're just rushing forwards, ), the front and back of crates, ledges that people jump up to, etc. You could then put in code to make the spybot godlike at facestabs (since the computer can perfectly calculate momentum).
There could also be an option to manually put in large amounts of these "trap spots" - have a dictionary of locations to check for specific situations. For example, the jumping-at-a-ledge situation - you could find ledges that people easily get stabbed on, and then say: "If someone is in this general location and jumps in such a way that he will land on this piece of land, get to where he will land and initiate a stab timed so that you kill him when he does." Or "if there are less than three people on this capture point, one of which is not too dangerous for you, get to the top, fall down and jumpstab the more dangerous one, and then shoot the other."

One significant disadvantage of this is that people might start trying to stab you in real life.

I'm thinking that against spies... well, if you're server-side, your bots will have a huge advantage against spies. Spychecking seems simple - fire randomly every few seconds if there's no enemies around, and jump like a mother toucher. And once you find a spy, just follow him and fire, with a chance of "missing" that decays over time, but which is boosted by getting a hit (and being sure where he is again). If you can detect forks in the path, you could also put that in and have large decays there - after all, there's not much difficulty chasing a spy down a long hallway, but once he reaches one staircase up and another down, it gets much harder.

...You might already have this, but it might be useful to put in some variables to calculate the sort of factors that humans think about. For example, maybe instead of saying, "Yo, Infiltrator, stab this guy," you could say, "Yo, Infiltrator, stab this guy unless you don't want to." And the bot balances various things in his head; if it's a Capture the Flag mode, and he knows most people are probably fighting somewhere else (a circle of where you last saw everyone that expands over time for uncertainty?), then he really "wants" to grab the flag and pursue that over other stuff. If it's a Capture Point mode, and he knows one guy is almost going to capture the other point, he's also going to want to do that. If there are enemies, and they are firing, and he can't see friends, he knows they are spychecking so he will be scared to go near them. There could also be a rough matchup/range table, like Spy is weak at close range to the Firebug but a little better at long range and so on (this will include the revolver only and not the knife).

So there might be many variables such as that, and decisions will use them in various ways, with the bot always weighing different decisions with what he was going to do before. For example, if the bot is running around and sees someone, he will start calculating whether it would be profitable for him to stab that guy. The bot takes the close-range matchup value of the guy, which is very large as he is a Heavy. But the Heavy is not firing, so he figures he can kill him and reduces the value by 90%. He also sees a Firebug. However, the Firebug is pretty far away, so he takes the long-range value for the Firebug, and then reduces it further (danger values are equal to the matchup value, plus exponential decay if the unit is farther away than "long-range", e.g. offscreen). The total danger value is low compared to the profitability of stabbing (the Heavy has a high value in the profitable-stabs table, which is even larger because he is standing on a capture point), so the Infiltrator stabs him.

This seems like it would lead to some pretty horrible bugs, like if you have 50v50 on a map where the two teams spawn next to each other and the total "danger value" of each enemy scares the hell out of all the bots, so they stay in their spawn point forever or something. So it might be useful to track the values and be able to output them in a debug mode. This might also require more computation than is feasible, especially with many bots.
You are absolutely and completely correct. This is how it should be.

This is how modern AIs are made, by attribuing points to different actions and thinking of the pros and cons.

It's a damn sight more complicated then what I currently have.

I cheated. I used very simple algorithms, that just work. The perfect example is what I used for the autogun placement. You could design a system where you have to manually set hotspots, or you could make a huge "experience - where does my sentry gain most kills?" system which takes up 3 pages of code.
My solution?
Code:
if nutsNBolts == 100 and canBuild and enemy_in_sight
{
   build_sentry()
}
You can't really think of a cheaper one.
And more than half the time, it even works, because the engie will place the sentry at the first point where he sees an enemy, which is on top of crates, at the beginning of corridors, etc...

You're kinda thinking too far.


Also, don't underestimate the difficulty of programming "take the alt path to go on top and drop down" (without nodes, of course)


PS: Welcome to the forums!
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
Derpduck [LORD]
2011 Haxxy Finalist
*
Offline Offline

Posts: 3529



« Reply #328 on: July 16, 2011, 11:18:57 am »

tl;dr
Logged

Orpheon
2011 Haxxy Award Winner
*
Offline Offline

Posts: 5813


Developer


« Reply #329 on: July 16, 2011, 11:20:59 am »

tl;dr
lrn2rid

He just more or less explained the skeleton of a prof. AI
« Last Edit: July 16, 2011, 11:21:49 am by Orpheon [ONE] » Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.376 seconds with 18 queries.