[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/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 - The Dijkstra Project

The Dijkstra Project

Discuss Artificial Intelligence and Bot programming.

Moderator: InsideQC Admins

The Dijkstra Project

Postby OneManClan » Sat Apr 12, 2014 1:17 am

Last edited by OneManClan on Sun Apr 13, 2014 4:40 pm, edited 1 time in total.
OneManClan
 
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Re: The Dijkstra Project

Postby Spike » Sat Apr 12, 2014 12:09 pm

find finds strings. don't use it for floats or ents. that way lies madness (or instability).
findchain finds a chain of entities. if you call it multiple times within a loop, or recursively, then you lose.
field arrays are best kept small. your code will need 160 new fields. you should probably prioritise them.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: The Dijkstra Project

Postby OneManClan » Sun Apr 13, 2014 3:52 am

OneManClan
 
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Re: The Dijkstra Project

Postby Spike » Sun Apr 13, 2014 5:12 am

find is slow. slow slow slow. it has to do string comparisons for every single entity on the map. it does not scale.
findfloat is better, but still has to check lots of entities.
you don't prioritise. in fact, if your array is anything less than 'num_of_nodes' then I assume you'll write your array out of bounds.
I should also point out that local arrays are not normally supported (#pragma target fte for that). dynamically sized arrays are not supported either (although I could theoretically implement that, there's no support right now). have fun.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: The Dijkstra Project

Postby ratbert » Sun Apr 13, 2014 4:21 pm

OMC couple things

1) Take a look at the last release of CustomTF coop that gizmo maintained. I sent him some code changes that would address some issues with grunties getting stuck and I know he had some things he did to the gruntie bot code to improve it.

2) I know way back there were a couple mods our there that one was TFBot for regular team fortress and another CTFBot for Capture The Flag mod. Remember TFBot one was not bad other CTFBot was pretty good at play CTF mod itself. Course that way back in late 1990's - early 2000's when I last played them. Source code is out there somewhere on the net.
ratbert
 
Posts: 37
Joined: Thu Nov 19, 2009 3:47 pm

Re: The Dijkstra Project

Postby OneManClan » Mon Apr 14, 2014 5:11 am

OneManClan
 
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Re: The Dijkstra Project

Postby OneManClan » Mon Apr 14, 2014 3:35 pm

OneManClan
 
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Re: The Dijkstra Project

Postby ratbert » Mon Apr 14, 2014 6:02 pm

ratbert
 
Posts: 37
Joined: Thu Nov 19, 2009 3:47 pm

Re: The Dijkstra Project

Postby jitspoe » Mon Apr 14, 2014 6:31 pm

I'm not sure if this will be of any help, but I'm also at the beginnings of AI programming and have some source (in a rough state) up here:

http://paintball2.cvs.sourceforge.net/v ... all2/bots/

It's for Quake2, but kind of separated from the game code (in its own lib). I think you could make use of the astar code -- at least for reference. I used JABot and some various tutorials for reference. JABot seemed a little over-engineered, so this is stripped down a little.

jitspoe
 
Posts: 217
Joined: Mon Jan 17, 2005 5:27 am

Re: The Dijkstra Project

Postby c0burn » Sun Jun 29, 2014 10:48 pm

c0burn
 
Posts: 208
Joined: Fri Nov 05, 2004 12:48 pm
Location: Liverpool, England

Re: The Dijkstra Project

Postby Cobalt » Sat Aug 02, 2014 5:34 pm

I have been modifying the original ctfbot+ code for years to try and improve the botai. My mod is called Tekbotctf+

Nav is THE biggest issue for sure. The CTFBOTS pretty mch use findradius to see what items are in the area, then if visible, are "flung" to them in a straight line. Yea, they can hit corners, but with older Quake they are movetype_step, and I believe it helps them when going around the corners, also if I recall this movetype wont fall off a ledge, rather it will follow along the edge(s) of such an area.

Newer bots like Frik, are nearly 100% cloning actual human players, and the walk movetype will now make them stick on corners as well as fall off ledges. Frikbot pretty much does a decent job of stopping them from falling with tests first.

One thing I am experimenting / trying is using trace_plane_normal on the bot , embedded into a new.touch for the bot. Whenever a .touch is called most engines will set trace_plane_normal that same frame so that you can refer to it in the ents .touch function. Compare the values in that to see if its against a wall , and I guess check if velocity is under a certain min value, and its stuck. Spike had told me a while ago that its not the best way to get trace_plane_normal like that, and I agree the traceline would be better, but so far in my mod is has been ok, and I use DP.

Not sure how good your code is Coburn....hope you put up another demo showing it in use maybe.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: The Dijkstra Project

Postby OneManClan » Tue Sep 02, 2014 10:30 am

Last edited by OneManClan on Thu Sep 04, 2014 8:59 am, edited 9 times in total.
OneManClan
 
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Re: The Dijkstra Project

Postby drm_wayne » Tue Sep 02, 2014 11:19 am

Is c0burn's source avaiable?
I made an custom bot back in the days with waypoint navigation, and if the bot sees the player he will start moving and attacking the player.
Also i added the "tracker system" from aicafe, so if the player walks around a corner / thru a teleporter the bot / enemy will chase you.

User avatar
drm_wayne
 
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Re: The Dijkstra Project

Postby OneManClan » Tue Sep 02, 2014 10:42 pm

Last edited by OneManClan on Thu Sep 04, 2014 4:19 am, edited 1 time in total.
OneManClan
 
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Re: The Dijkstra Project

Postby jitspoe » Wed Sep 03, 2014 7:01 pm

You might consider switching to A*. Dijkstra explores all possible waypoints and can be expensive. A* is a bit smarter, so it can be a big performance gain if you have a lot of points.

I have some code here (that I heavily referenced ACEBot source for): http://paintball2.cvs.sourceforge.net/v ... all2/bots/

Your data structures will likely be different, but maybe the logic will be a worthwhile reference.

jitspoe
 
Posts: 217
Joined: Mon Jan 17, 2005 5:27 am

Next

Return to Artificial Intelligence

Who is online

Users browsing this forum: No registered users and 1 guest