[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Frikbot Item desirability

Frikbot Item desirability

Discuss Artificial Intelligence and Bot programming.

Moderator: InsideQC Admins

Re: Frikbot Item desirability

Postby gnounc » Sun Mar 23, 2014 5:09 am

Doing what I said above would be a start. It would set the priority of the item on item spawn. So it would
update to your new random value every time the item spawns.

On the other side, you would want to set the items priority to zero when its picked up.
That would ensure the bots ignore the item until its respawned.
self.thisp = 0;

that will work because the map items are still there, theyre just invisible and inactive.
but THEN, you still need to find the function that reactivates them, and reset their priority (to something random again if you prefer) so when the item respawns its priority is not still at 0, and the bot knows to seek out that item again.

Thats really all there should be to it.
my
gnounc's
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Re: Frikbot Item desirability

Postby gnounc » Sun Mar 23, 2014 6:09 am

my
gnounc's
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Re: Frikbot Item desirability

Postby Lightning Hunter » Sun Mar 23, 2014 5:55 pm

Gnounc, you are awesome. I was going to sit down today and try to figure some of this out myself, but it probably would have taken me all day, and I would have been asking for help anyway. Now I can complete some more waypoints instead. I'll be adding you to the credits for sure.

I do have some questions about this new code, however:

-First of all, I noticed that my QC compiler was complaining about "rand" being an unknown value in items.qc, so I changed it to "random". Will this hurt anything?

-Should I remove the random values in bot_ai, since they are now calculated in items.qc? After all, you gave everything a universal random value of 35, correct? Are the item priorities even used anymore in bot_ai?
User avatar
Lightning Hunter
 
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Re: Frikbot Item desirability

Postby gnounc » Sun Mar 23, 2014 10:30 pm

yeah random() is what i meant. i always do that for some reason.

Anything you put in bot_ai for randomness beforehand should be reverted, but the priority values are otherwise still used.

Let me know if it works.
my
gnounc's
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Re: Frikbot Item desirability

Postby Lightning Hunter » Mon Mar 24, 2014 12:10 am

User avatar
Lightning Hunter
 
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Re: Frikbot Item desirability

Postby gnounc » Mon Mar 24, 2014 2:25 am

yeah, theyre equally distributed random values, so they should be going for the same items roughly. the variance should be pretty slight. doing what you said would help. allowing a wider variation including negative would help too.

you can do that by doing a second random call and using that to set the random bonus to negative 50% of the time.

remembering to cap it at 0 of course. then your range would be from 0 to 65. The difference would be much more noticable then.
my
gnounc's
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Re: Frikbot Item desirability

Postby Spike » Mon Mar 24, 2014 2:43 am

apparent preference for an item can also be affected by the waypoints the bot generates. if it stays within an area, chances are its because it only has waypoints for that area, and because it stays, it doesn't generate any for anywhere else.
I dunno, I'm too lazy to study the code.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Frikbot Item desirability

Postby Lightning Hunter » Mon Mar 24, 2014 3:44 am

Last edited by Lightning Hunter on Mon Mar 24, 2014 4:05 am, edited 1 time in total.
User avatar
Lightning Hunter
 
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Re: Frikbot Item desirability

Postby gnounc » Mon Mar 24, 2014 4:05 am

my
gnounc's
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Re: Frikbot Item desirability

Postby Lightning Hunter » Mon Mar 24, 2014 4:07 am

User avatar
Lightning Hunter
 
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Re: Frikbot Item desirability

Postby gnounc » Mon Mar 24, 2014 5:10 am

no i hadnt seen the edits. Yes, the randomization should apply to ammo as well.
Also you said the bots still fight over a spawn item thats already been taken..above i mentioned in botAI checking for an item being taken and removing it from the list, I dont see you mentioning having put that code in. If items arent removed from their goal list, they will continue to try to get them.

Also you may be better served at this point by going to the irc channel.
my
gnounc's
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Re: Frikbot Item desirability

Postby Lightning Hunter » Mon Mar 24, 2014 7:16 am

User avatar
Lightning Hunter
 
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Re: Frikbot Item desirability

Postby gnounc » Mon Mar 24, 2014 12:29 pm

thing is correct there.

thing is the argument name of the entity being passed.
if you look a bit above that it says something like thing.waypoint.
my
gnounc's
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Re: Frikbot Item desirability

Postby Lightning Hunter » Mon Mar 24, 2014 10:49 pm

After doing more testing today, I can confirm that the random priority seems to be working at the start of each match. However, the random values don't seem to be updated each time the item is respawned, because the bots go for the same items the whole match. Also, I noticed some strange behavior with the Frikbots now in which they randomly decide to deviate from their current goal, get off track, and run in to some walls. I think this happens when they decide they want a different item and attempt to go for a different waypoint/item, but don't properly calculate how to get their based on the nearest waypoint. They instead just run straight toward the item/goal/waypoint (which may be across the whole map), and get stuck on a wall.

Thanks for the help so far Gnounc, but maybe this is more trouble than it is worth? Of course, if you have some ideas of what might resolve these issues, I would love to hear them. :)
User avatar
Lightning Hunter
 
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Re: Frikbot Item desirability

Postby gnounc » Tue Mar 25, 2014 12:39 am

sorry, I'm out of ideas.
I'm really not sure what else to do, except ask frikac for help.
I hope you manage to get something going though.
my
gnounc's
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

PreviousNext

Return to Artificial Intelligence

Who is online

Users browsing this forum: No registered users and 2 guests