Green Wolf
Jr. Member

Offline
Posts: 85
You ain't got no pancake mix!
|
 |
« Reply #480 on: October 20, 2011, 05:24:20 am » |
|
The problem is that it changes to the distance to the target :/
I want a clean way to calculate it.
Take the instantaneous slope between you and the target using the equation, plugging in X and Y to calculate the theta of the angle, with X and Y as inputs with your answer in terms of the guns direction? You could probably use the Atan2 with the output of the above equation to calculate the angle to aim your gun at. So basically, guess, and then try to correct it? The old demoman scriptIt might actually work if I had a good way to guess. Found an equation system on wikipedia that may help, called the angle of reach.  So, whatever gg2's gravity acceleration rate is, compared to the target's polar distance, at an initial velocity of 10 (Stickybomb speed). For distance, you could just plug in the point_distance output from self to them. I went over the way to solve this problem with my calculus teacher, along with movement prediction. I can't remember the steps of his proof, should have wrote them down. I'll ask again tomorrow if he's feeling patient. Woah what? This compensates for current enemy hspeed? to determine where the bot aims, just create a series of 9 invisie nodes that move with the bot. So taking into account that the bot is in the ceter of the scree, the first node is a a half a screen away from bot (at the edge of screen). The second node would be halfway between the third node and first node. the third node will be halfway between bot and first node, and fourth node will be halfway between third node and bot. Mirror this on the otherr side of the bot, then place a node on the bot. 9 nodes. When a target comes within a nodes area (meaning it is closer to one node than another) the bot will aim at a predetermined point above the node, the aim point being decided through trial and error ( I suggest using lorgan'a pluginloader because of it's plugin for drawing the path mines will follow). After that we just determine what priority targets are.
That's unflexible, and you need far more than 9 nodes, since you need several in all directions. you can insert more nodes if you want, but this is just concept. Also, remember that we don't want the bot to aim perfectly. A node system bring the accuracy to within a few units. The more nodes, the more accurate it is. A similar system could be used for spy stab timing, but with different nodes for different classes (because they don't all move at the same speed).
|
|
|
|
|
Logged
|
this guy he is enlightened
Yes, real nice Wareya. I just love how your arguements are fucking retarded and prove absolutely nothing. What's next, do you flick your favourite "Shut up, I am the developer, I MADE THE GAME" card? Or rather the "Oh, you are just a bad player then" card?
|
|
|
Orpheon
2011 Haxxy Award Winner
Offline
Posts: 5818
Developer
|
 |
« Reply #481 on: October 20, 2011, 05:36:20 am » |
|
you can insert more nodes if you want, but this is just concept.
I'd guess around 5 nodes in all directions, which means 5*16 nodes. That's a lot of them. And five is really few. Also, remember that we don't want the bot to aim perfectly.
What? Who said that? They should be able to aim prefectly, giving them a little random aim afterwards for easier levels isn't hard. A similar system could be used for spy stab timing, but with different nodes for different classes (because they don't all move at the same speed).
>Spy stab timing predicted_x = enemy.x+enemy.hspeed*time if predicted_x in stabMask and not collision_line(object.x, object.y, predicted_x, enemy.y): Stab() Though this IS a good idea for the beginning guessing for my algorithm I posted before.
|
|
|
|
« Last Edit: October 20, 2011, 05:37:47 am by Orpheon »
|
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.
|
|
|
MTK5012
2011 Haxxy Finalist
Offline
Posts: 738
I was Gangsterman
|
 |
« Reply #482 on: October 20, 2011, 10:05:45 am » |
|
just predict then explode when one of the enemy is near your mines it don't have to be perfect,like the spy stab,you will never able to achieve 100% accurate stabs...
|
|
|
|
|
Logged
|
|
|
|
Orpheon
2011 Haxxy Award Winner
Offline
Posts: 5818
Developer
|
 |
« Reply #483 on: October 20, 2011, 10:14:19 am » |
|
just predict then explode when one of the enemy is near your mines it don't have to be perfect,like the spy stab,you will never able to achieve 100% accurate stabs...
Damn it, the problem with stabs isn't the predicting, it's the reaction of players, or even worse, the reaction of bots. The computer can know with almost pixel-perfect precision where the enemy will be in a set time, but can't reliably guess whether that enemy is distracted or stupid enough to walk into the stab. Hence why I didn't do the spy.
|
|
|
|
|
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.
|
|
|
MTK5012
2011 Haxxy Finalist
Offline
Posts: 738
I was Gangsterman
|
 |
« Reply #484 on: October 21, 2011, 12:47:24 am » |
|
make the bot have a spy-alert-timer that countdown to 0,when it's 0 the BOTGETTARGET can get spy as target.
|
|
|
|
|
Logged
|
|
|
|
MTK5012
2011 Haxxy Finalist
Offline
Posts: 738
I was Gangsterman
|
 |
« Reply #485 on: October 21, 2011, 01:18:51 am » |
|
i made it it work somehow but it isn't good enough for orpheon coz all the bot react to spies immediately (need to nerf,a new variable wont kill anyone you know) and predicting is the least successful way
|
|
|
|
|
Logged
|
|
|
|
|
Machidro
|
 |
« Reply #486 on: October 21, 2011, 01:23:24 am » |
|
i made it it work somehow but it isn't good enough for orpheon coz all the bot react to spies immediately (need to nerf,a new variable wont kill anyone you know) and predicting is the least successful way
If hit by a spy, make the spy an availible target, else don't, doesn't seem that hard.
|
|
|
|
|
Logged
|
A CHALLENGER HAS ARRIVED.
|
|
|
Orpheon
2011 Haxxy Award Winner
Offline
Posts: 5818
Developer
|
 |
« Reply #487 on: October 21, 2011, 02:48:40 am » |
|
The main problem about the whole thing is the current target selection. The bot only considers the nearest Target, or the nearest Target with line of sight. Also, say you detect a player available for stabbing. The can't know whether there's another player in-between spamming it's head off. A spy must be incredibly tuned to everything that's happening, and very flexible. Stuff like only stabbing the autogun when a scout actually comes and stuff is also very hard to program. i made it it work somehow but it isn't good enough for orpheon coz all the bot react to spies immediately (need to nerf,a new variable wont kill anyone you know) and predicting is the least successful way
Yours wasn't good enough because it primarily on random movement, random jumping, random decision-making and semi-random shooting. Then there's also the matter of fleeing, which is an art. Remember that the bot doesn't know of a crate as such (atm). Tricking an enemy means reacting to the slightest aim adjustement, which a computer can't reliably do. Etc... My primary concern right now is noding and medics, demoman and spies are bit too much trouble for their worth right now.
|
|
|
|
« Last Edit: October 21, 2011, 02:49:17 am by Orpheon »
|
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.
|
|
|
MTK5012
2011 Haxxy Finalist
Offline
Posts: 738
I was Gangsterman
|
 |
« Reply #488 on: October 21, 2011, 05:39:58 am » |
|
Yours wasn't good enough because it primarily on random movement, random jumping, random decision-making and semi-random shooting.
i love random movement you know... it make the bot more human... but as i said,it's your bot,not mine
|
|
|
|
|
Logged
|
|
|
|
Green Wolf
Jr. Member

Offline
Posts: 85
You ain't got no pancake mix!
|
 |
« Reply #489 on: October 21, 2011, 08:24:45 pm » |
|
the main problem I see is that the bots are both too smart and too stupid. The comstructoes drop autoguns at random, and the bots start shooting at a spy the second it uncloaks/stabs. Solution: place nodes at strategic places on the map that tell constructors where to build autoguns. For spy shooting, time the reaction times of various people, seeing how long it takes them to react when they see a spy start stab. Takee tthe average, then tell the bots to wait that long after tthey see a spy start stab before they start to do something to react to spy. Also, try and stop bots from shooting passive insiblity spies behind them. Donlt we also need quote/curly bots along with the spy demoman and medic. Also, the noded maps for truwfort and 2dfort are flawed. I am uploading a fixed version as soon as possible.
|
|
|
|
|
Logged
|
this guy he is enlightened
Yes, real nice Wareya. I just love how your arguements are fucking retarded and prove absolutely nothing. What's next, do you flick your favourite "Shut up, I am the developer, I MADE THE GAME" card? Or rather the "Oh, you are just a bad player then" card?
|
|
|
|
Unsung Hero
|
 |
« Reply #490 on: October 21, 2011, 10:41:22 pm » |
|
Flawed in what way?
|
|
|
|
|
Logged
|
 Swimming is all about speshul powah. I have mastered swimming in 721 different strokes. Proud member of [PHS]
|
|
|
Green Wolf
Jr. Member

Offline
Posts: 85
You ain't got no pancake mix!
|
 |
« Reply #491 on: October 21, 2011, 10:47:07 pm » |
|
I forgot to make the nodes jump nodes, and I alsondidnlt read thing about moude determining direction bot moves.
|
|
|
|
|
Logged
|
this guy he is enlightened
Yes, real nice Wareya. I just love how your arguements are fucking retarded and prove absolutely nothing. What's next, do you flick your favourite "Shut up, I am the developer, I MADE THE GAME" card? Or rather the "Oh, you are just a bad player then" card?
|
|
|
Orpheon
2011 Haxxy Award Winner
Offline
Posts: 5818
Developer
|
 |
« Reply #492 on: October 22, 2011, 03:31:28 am » |
|
The comstructoes drop autoguns at random
At random? Actually, I thought that algorithm I used worked pretty well. 6 of 7 sentries get placed to useful spots, and the rest serve as a distraction. Although, now that you mention it, I think I got an idea to improve a bit that 1/7th. It has to do without the target_in_sight variable.
|
|
|
|
« Last Edit: October 22, 2011, 03:31:47 am by Orpheon »
|
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
Posts: 3529
|
 |
« Reply #493 on: October 22, 2011, 04:30:44 am » |
|
Make quote bots, spam bubbles and use blade when close enough
|
|
|
|
|
Logged
|
|
|
|
|
nightcracker
|
 |
« Reply #494 on: October 23, 2011, 10:52:44 am » |
|
I figure it will be quite hard to code in the fact that Q/C needs to move their bubbles around obstacles when moving around.
|
|
|
|
|
Logged
|
|
|
|
|