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?
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!