Please take the time to login

Not a Member... What are you waiting for...
Join us and gain full access to the downloads section.

Registration is completely Free

    RB Logic

    Share

    Tullius
    Moderator
    Moderator

    Posts: 149
    Join date: 2009-01-20
    Location: Germany (Saxony)

    RB Logic

    Post by Tullius on Wed May 25, 2011 12:39 pm

    In the past i have alreday hinted and talked with some members about a football (more on my "website") simulation i am working on. At the moment i have the pathfinding algorithm almost in the box but yesterday i am stumbled in a poser scenario which i post here in the hope to find some helpful suggestions. Here is the scene

    Best Path Question (Link)

    The RB (who is past the LOS) will in the endzone which is located at the top (the ball is "already" there). But between the RB and the ball are 5 defenders. (The alignment of the defenders was randomly choosen because i wanted testing only some things with the graphic engine.) The possible paths are marked by arrows. Interesting is the gap between A and B is small but the back is almost empty so when the RB can elude both he has chance to run in the endzone or make at least a big gain. But there is also a great risk that he is tackled by A and B very soon and make almost no positive yards.

    The gap between A and C is bigger but the back is populated by two more DB and it is almost sure he is tackled after some further yards.

    What would an IRL RB do ?


    _________________
    [You must be registered and logged in to see this link.]

    Terryt33
    Special Teams
    Special Teams

    Posts: 96
    Join date: 2010-02-05

    Re: RB Logic

    Post by Terryt33 on Wed May 25, 2011 7:00 pm

    Is it an "if/then" algorithm? Because my opinion would be the back would try to split the defenders first (yellow path) then if B defender closed in bounce it to the outside (blue path). Guess that wasn't much help though, huh?

    Tullius
    Moderator
    Moderator

    Posts: 149
    Join date: 2009-01-20
    Location: Germany (Saxony)

    Re: RB Logic

    Post by Tullius on Wed May 25, 2011 7:29 pm

    It is a little brainstorming and i need ideas. The RB should act in a realistic manner. I could also ask so: "What would a human RB do ?".

    There is no "if (...) "then" algorithm. The pathfinding algorithm depends on the player role. Here we speak about ball carierrs. There is an algorithm for situations before the LOS and after. I should also add that the RB evaluates (like all other players) constantly the situation (depends a little bit on ressources but it is fair to say he does it several times in a second) so he is reacting to defenders and defenders to him or better his possible path. In the whole process is a much vector math involved and i do not use classical pathfinding strategies because i think for a football pitch my approach is better suited.

    My main idea is that the RB handels the nearest player and tries to run away from him ( i could make an exception for these "bully" RB who simply running over all what is in the way = solution "brown"). In my solution the RB would choose the red way simply because the distance between A and C is larger than A - B. Blue is interesting but here the RB risks a negative yardage because when B tackles him then he wil learn a net loss.


    _________________
    [You must be registered and logged in to see this link.]

    killershrew
    V.I.P.
    V.I.P.

    Posts: 468
    Join date: 2009-12-08
    Location: Helsingborg, Sweden

    Re: RB Logic

    Post by killershrew on Wed May 25, 2011 7:53 pm

    I haven't ever programmed any pathfinding ai so i'm really out of my depths here but here's my five cents:

    What if you divide the field into zones for the RB to judge? You could have any number of zones ofcourse but for simplicity lets say you divide the backfield into a right and left zone like this:

    [You must be registered and logged in to see this image.]

    The RB could first evaluate his chances of getting through the line by going left or right but when the chances are similar like here the threat level in the zones could weigh in and sometimes make him go for the yellow or blue option.

    Tullius
    Moderator
    Moderator

    Posts: 149
    Join date: 2009-01-20
    Location: Germany (Saxony)

    Re: RB Logic

    Post by Tullius on Wed May 25, 2011 8:14 pm

    Your approach has some merits but it is really realisic ? Does a RB has the vision to scan the complete field and makes a decision based on these informations or sees only some runners in front of him and thinks on the next man who will tackle him ?


    _________________
    [You must be registered and logged in to see this link.]

    killershrew
    V.I.P.
    V.I.P.

    Posts: 468
    Join date: 2009-12-08
    Location: Helsingborg, Sweden

    Re: RB Logic

    Post by killershrew on Wed May 25, 2011 8:18 pm

    Tullius wrote:Your approach has some merits but it is really realisic ? Does a RB has the vision to scan the complete field and makes a decision based on these informations or sees only some runners in front of him and thinks on the next man who will tackle him ?


    The size of the section of field he can evaluate could be relative to his intelligence or awareness or he could simply have a "vision" skill...

    Terryt33
    Special Teams
    Special Teams

    Posts: 96
    Join date: 2010-02-05

    Re: RB Logic

    Post by Terryt33 on Thu May 26, 2011 4:34 am

    If you're talking about a "human" RB, I think you need to not only look at a "vision" attribute, but a "speed" and "strength" attribute as well. A smaller back (ie Reggie Bush) in the open field (ie past the LOS) is going to look to outrun the defender to the side (the light red or blue) and will give up yardage to try and get to the outside. A bigger back, or one with more strength will be more likely to take on the defender and try and run over him (ie a Jerome Bettis, or "hopefull" a Mark Ingram).

    killershrew
    V.I.P.
    V.I.P.

    Posts: 468
    Join date: 2009-12-08
    Location: Helsingborg, Sweden

    Revised suggestion

    Post by killershrew on Thu May 26, 2011 7:15 pm

    Killershrews suggestion 2.0:

    [You must be registered and logged in to see this image.]

    Size of the circle and possibly width of sections depends on player awareness.

    I like Terrys input too. Maybe have a look at how "player roles" work in Fifa Manager, it is one of the biggest merits of that game.

    Tullius
    Moderator
    Moderator

    Posts: 149
    Join date: 2009-01-20
    Location: Germany (Saxony)

    Re: RB Logic

    Post by Tullius on Thu May 26, 2011 8:10 pm

    It is all very interesting. Terry has a point here because the opitmal path depends on the speed of the RB. A slower RB has an other ideal path than an fast RB. So a power runner must act diffrent than an elusive runner. Timothy Gay in "The Physics of Football" (page 94ff.) shows the math.

    After a good deal of thought i have now the following idea. Pathfinding for the Ball Carrier (BC) is done in several phases.

    1. Phase:
    RB follows a script ountlined in the play editor and breaks through the LOS (outside or inside). I have read that most coaches teaches RB that the RB should watches his blockers or the blocked defender and act according their actions.

    2. Phase:

    Secure 1st Down - safest path

    3. Phase:

    a) RB is still in the box :
    He tries to make as many yards as possible and this means often a direct path forwards or running in gap between defenders (my original idea). The typical result will be that the RB is cruhsing in the defender (even then he can make some additional yards) when he can not elude the tackler.

    b) RB in the perimeter:
    He will run in the open space (run to daylight)

    For the situation in my opening post the solution is then (i assume he is out of the box):

    a) When the offense has not already a first down the RB follows the brown or yellow path - depends on how many yards are needed.

    b) When the first down is secure a power back follows the yellow route and his elusive collegue run the blue way.



    _________________
    [You must be registered and logged in to see this link.]

    Marauders
    V.I.P
    V.I.P

    Posts: 122
    Join date: 2009-12-18

    Re: RB Logic

    Post by Marauders on Thu May 26, 2011 10:12 pm

    If the RB is beyond his blockers and the LOS, he needs to turn it up-field. The best path would likely be just to the right, from the RB perspective, of defender A. It is the quickest route down-field, gives the back a chance to go down hill, and puts player B at a bad angle. It is unlikely that isolation would happen in a game though, as running plays would have down-field blocking by receivers and often would put a tight end or guard into the second level as well.

    I actually like the way David handled that in Maximum Football, but I had asked him to make Vision an attribute. It is too bad he didn't do that for 2.0.

      Current date/time is Thu May 17, 2012 1:33 am