RealBot icon indicating copy to clipboard operation
RealBot copied to clipboard

Improve the mechanism that creates node connections

Open stefanhendriks opened this issue 6 years ago • 3 comments

There is a function Reachable which plays an important role for connecting nodes. Improving this should reduce the need for #17 . For example, in as_oilrig it learns some connections that are impossible to make:

image

This is typical on as_oilrig for instance, it also messes up the connections here:

image

The same symptom - although you don't see any connections drawn here.

I believe it has something to do with improper usage of point_hull. Perhaps we should use a crouched hull (head_hull?).

This will probably also reduce the errored connections in #17 for cs_italy.

stefanhendriks avatar Oct 02 '19 06:10 stefanhendriks

should the UTIL_TraceHull(Start, End, ignore_monsters, point_hull, NULL, &tr); check use human_hull ?

RCBot uses the following method image

  1. traceline from origin1 to origin2. If flFraction < 1.0, fail
  2. traceline from origin1 - cross product normalized * 16 to origin2 - cross product normalized * 16 (width check 1). If flFraction < 1.0, fail
  3. traceline from origin1 + cross product normalized * 16 to origin2 + cross product normalized * 16 (width check 2). If flFraction < 1.0, fail
  4. divide component into eight sections, check ground between each section by tracelining to ground after each component. If no ground (flFraction >= 1.0) then fail.

(mspaint image attached) ha

code here

https://github.com/rcbotCheeseh/RCBotSven5/blob/master/BotManager.as

bool UTIL_IsReachable ( Vector vFrom, Vector vTo, CBaseEntity@ ignore = null )

rcbotCheeseh avatar Oct 02 '19 18:10 rcbotCheeseh

Yes probably something like that. Thanks for the pointers! :)

stefanhendriks avatar Oct 02 '19 19:10 stefanhendriks

Although, in some cases you could argue that no ground being there in between could be jumpable, so the distance and height might make a difference. Ie something close enough and not too high is still jumpable. Think of the crate->window in cs_italy from CT spawn. Although, I'd rather have not that connection but other better connections than have only that one working and bad connections all over the place :)

stefanhendriks avatar Oct 02 '19 19:10 stefanhendriks