"Any other bot"?

User avatar
HBomb
Algorithm
Algorithm
Posts: 93

"Any other bot"?

Post#1 » 19 Dec 2016, 06:06

I'm working on a series of subroutines about how to handle one-on-ones and Im struggling to figure something out; How can I combine conditions to get the condition "If no other bot exists in short/med/long range"?

My closest answer is "if target is sniper, do any shotgun/mg/assault exist in range?" etc. but that doesn't work if two of the same class come along.

ConsciouS-0nE
Autonomous Entity
Autonomous Entity
Posts: 740

Re: "Any other bot"?

Post#2 » 19 Dec 2016, 06:19

You do it one by one

Edit:
Image

4th row horizontal line can just be optional.
Its just the enemy that will be targeted in med range in such conditions.

Screenshot_2016-12-19-13-49-15.png
For med range, can be less but i dunno if it works.
Screenshot_2016-12-19-13-49-15.png (111.88 KiB) Viewed 1516 times
Last edited by ConsciouS-0nE on 19 Dec 2016, 07:01, edited 3 times in total.
Im not the best player, but atleast im something.I'm 8
Science is madness! 3:)

User avatar
HBomb
Algorithm
Algorithm
Posts: 93

Re: "Any other bot"?

Post#3 » 19 Dec 2016, 06:36

ConsciouS-0nE wrote:You do it one by one



I don't follow

Hamster
Script
Script
Posts: 28

Re: "Any other bot"?

Post#4 » 19 Dec 2016, 07:45

Probably the easiest workaround is to utilise the fact that only one of the special classes can exist.

So if:
Enemy (isAssualt | isShotgun | isSniper) Exists == False
Then we know that (by deduction):
Remaining Enemy = isMachineGun

Unfortunately being able to use multiple assault bots does throw a spanner in the works.

I myself have been trying to build bots that know if they have a numerical advantage in a local fight (if they do, I suspect I can win more bouts by pressing that advantage and then getting them to help in a fight elsewhere).

The logic is however damn tricky (especially when trying to factor in assault bots) and seems to require a fair bit of grunt work.


Personally I'd recommend testing on the small maps like Kingmaker. Since you should need far fewer test cases to get the behaviour you want.

ConsciouS-0nE
Autonomous Entity
Autonomous Entity
Posts: 740

Re: "Any other bot"?

Post#5 » 19 Dec 2016, 07:51

My sw bot (9/10 wins every games)

Specializing classes as target in their existence.

Rather than bots in ranges,
But i just gave what youve asked.



Screenshot_2016-12-19-15-05-26.png
Do the ranges separetly one by one for specific actions each range (48 conditions in total, did not include out of range. )
Screenshot_2016-12-19-15-05-26.png (99.92 KiB) Viewed 1506 times
Im not the best player, but atleast im something.I'm 8
Science is madness! 3:)

User avatar
HBomb
Algorithm
Algorithm
Posts: 93

Re: "Any other bot"?

Post#6 » 19 Dec 2016, 08:21

That's what I do now... I was rather hoping someone had figured out at a more watertight solution. Thank you anyway.

If it's of help though, you can shorten those to:
If target is classW at range1/rangr2/range3.
If not exists ClassX/ClassY/ClassZ at range1/rangr2/range3.

ConsciouS-0nE
Autonomous Entity
Autonomous Entity
Posts: 740

Re: "Any other bot"?

Post#7 » 19 Dec 2016, 08:27

That would do diffrent results i think,
Thats why i said one by one.

Your shorten way caused your first error.

You wanted the bot to determine,
3 ranges (4 if oor included)
With 4 classes.

That would be a vast bulk of conditions to achive the behavior you wanted.
<3.
Im not the best player, but atleast im something.I'm 8
Science is madness! 3:)

User avatar
NullPointer
Autonomous Entity
Autonomous Entity
Posts: 539

Re: "Any other bot"?

Post#8 » 19 Dec 2016, 09:35

HBomb wrote:How can I combine conditions to get the condition "If no other bot exists in short/med/long range"?


Condition -> Enemy -> Any -> Exists -> check Invert -> Target Filters -> check Short/Medium/Long range

Do the same thing for Allies and it should be like this:

Image

ConsciouS-0nE
Autonomous Entity
Autonomous Entity
Posts: 740

Re: "Any other bot"?

Post#9 » 19 Dec 2016, 10:21

Sir null then thatll only turn green when every ai and and enemy if out of range.


He wanted his bots to check enemies with specific classes on specific ranges to induce one on one battle, with specific targeting.

That was Short range or med range or long range
Im not the best player, but atleast im something.I'm 8
Science is madness! 3:)

User avatar
NullPointer
Autonomous Entity
Autonomous Entity
Posts: 539

Re: "Any other bot"?

Post#10 » 19 Dec 2016, 10:55

Oh, I get it now. The question is actually "If no other bot exists in short/med/long range and have a different class than mine".

Conscious' solution is good, although you can groups those 3 top conditions into 1. There's no perfect solution for the Assault class, but you can try to "count" them by checking different shield/health levels and ranges. If they happen to be the same, you're dead.

User avatar
HBomb
Algorithm
Algorithm
Posts: 93

Re: "Any other bot"?

Post#11 » 19 Dec 2016, 16:58

Counting different health and shield combinations? Damn that would be a processor-breaking sized tree!

Bring on the Counting update!

ConsciouS-0nE
Autonomous Entity
Autonomous Entity
Posts: 740

Re: "Any other bot"?

Post#12 » 19 Dec 2016, 17:13

Thats how my first generic ai work from 4.x :D
Im not the best player, but atleast im something.I'm 8
Science is madness! 3:)

Return to “Questions”

Who is online

Users browsing this forum: No registered users and 1 guest