So you want the other guy to list their bot type in the binding? And for your bot's AI to be able to read the other bot's binding?Aside from the whole "a person might be driving", the next issue is how do you standardize bot types.
#list.append( ("Generic Popup", "AdvancedOmni", { 'radius':1.2, 'nose': math.pi, 'bot':"Popup", 'Speed':"Fast", 'wep':"Top", 'topspeed': 12.0, 'turn': 20, 'weapons': (11, 12, 13, 14,) }) ) #list.append( ("Generic ThirtySix", "AdvancedOmni", { 'radius':1.2, 'nose': math.pi, 'bot':"HS", 'Speed':"Slow", 'wep':"All", 'topspeed': 12.0, 'turn': 20, 'weapons': (11, 12, 13, 14,) }) )
Adaptive AI ?Yeah, that's gonna be difficult. As said before, it's mostly the gigantically large amounts of code that run at the same time and all the functions that need to be calculated every second. Also, .py size is gonna be multiplied by ten.Ever seen how an only mildly complex AI (FBSPlus) lags the game ? This will make the game lag to death.Too bad though because this is an awesome idea.
Ever seen how an only mildly complex AI (FBSPlus) lags the game ? This will make the game lag to death.
Just as an aside, I'm growing increasingly more skeptical of how Seism 13 actually functioned in BBEANS 5, as in why did it have to wait until post-match for it to realize that it had to change the position of its wedges? Also, how was it able to differentiate between being outwedged and simply entering the air from some other event? Would a random havok explosion sending the robot airborn influence its wedge position in the next match? If it did, would the wedge AI have to be manually reset, and isn't manually tinkering with the AI mid-round as not to gain/lose an advantage cheating? SO. MANY. QUESTIONS.
I've been hanging around the sidelines of this discussion just to see what people thought but I think its time to give some input.Quote from: System32 on November 28, 2011, 05:56:34 PM #list.append( ("Generic Popup", "AdvancedOmni", { 'radius':1.2, 'nose': math.pi, 'bot':"Popup", 'Speed':"Fast", 'wep':"Top", 'topspeed': 12.0, 'turn': 20, 'weapons': (11, 12, 13, 14,) }) ) #list.append( ("Generic ThirtySix", "AdvancedOmni", { 'radius':1.2, 'nose': math.pi, 'bot':"HS", 'Speed':"Slow", 'wep':"All", 'topspeed': 12.0, 'turn': 20, 'weapons': (11, 12, 13, 14,) }) )Making an AI that uses generalized bindings such as these wouldn't make the AI any smarter or more powerful, just easier to make. I've considered making something like this in the past but never got around to it (the plan was to use something like this for my Practice Garage so that it can auto AI more effectively).As Click has already mentioned, we can't look at the opponent's bindings to check their bot type because human's don't need bindings. We also use the opponent's components to determine the best attack strategy because (1) we can't tell a wedge from a round extender, (2) we can't tell the difference between similar bot types such as a VS and a HS, and (3) we can't look directly at the opponent's .bot file because we don't know which files are loaded into the EXE. I'm sure many people have considered this before but there just isn't any way around those three issues.One idea that I don't think has been mentioned would be to determine the AI's strategy based on a combination of guess-and-check and how the opponent is moving. It wouldn't provide the best course of action in all cases but it would allow the AI to "adapt" to its opponents. The biggest drawbacks would be the amount of coding necessary and the amount of processing that would need to be done per tick. Speed, turn speed, heading, direction, weight, and # of wheels are easy to get so if we keep an eye on them and keep track of when we receive the most damage (front, sides, underneath, above) then we could use that information to determine our best coarse of action. Saving collected data in a text file would also potentially improve performance in sequential fights.
SW, W, NW, N, NE, E, SE, S = map(lambda x: math.pi*x/4.0, range(-3,5))
for m in range(0,21): exec("ANGLE_%s = %s" %(m, m*math.pi/10.0))
I try to be here at least once a day... I just choose not to post everyday. As for the the 'math.pi' replacement, just stick this in Bindings.py under the "def load(list):" line.Code: [Select] SW, W, NW, N, NE, E, SE, S = map(lambda x: math.pi*x/4.0, range(-3,5))This basically makes all the abbreviated cardinal and ordinal directions available for use as nose values instead of using radians. These will likely be a problem for you in the future so I'd recommend either learning radians or using the next replacement instead.The botlab's heading arrow supports 20 different angles. Therefore SW, NW, NE, and SE don't exactly line up with any of the possible in-game angles. If you want everything to be the same, I would add something like this instead. Code: [Select] for m in range(0,21): exec("ANGLE_%s = %s" %(m, m*math.pi/10.0))This makes variables that look like this:ANGLE_x --> where x is a value between 0 and 20 (inclusive). The values go clockwise from the the default heading (UP/NORTH) but if you add a '-' before the variable they will go counter-clockwise. Adding 5 to x turns the nose 90 degrees. Just to give you the rough idea, here are the first 6:ANGLE_0 = ANGLE_20 = 0 radians = 0 degrees = UP/NORTH = default angleANGLE_1 = -ANGLE_19 = PI/10 radians = 18 degreesANGLE_2 = -ANGLE_18 = PI/5 radians = 36 degreesANGLE_3 = -ANGLE_17 = 3PI/10 radians = 54 degreesANGLE_4 = -ANGLE_16 = 2PI/5 radians = 72 degreesANGLE_5 = -ANGLE_15 = PI/2 radians = 90 degrees = RIGHT/EAST[warning]Using these instead of radians will cause problems for people that don't have this tweak (namely tournament hosts).If you are using the ANGLE_x variables, you can convert them to radians by replacing the "ANGLE_" with "math.pi/10*".[/warning]