Option estimate_blocking

Estimate the penalty when direction to ball is blocked by obstacles, e.g. opponent players, penalty is increased whenever an obstacle is detected and decreased when there is no obstacle.

State Machine

This browser can't display the SVG file svg/option_estimate_blocking.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html

State not_blocked

If that state is active,
 >  This decimal output symbol is set:
    strategy.blocking_penalty  = 
0
 
The decision tree:
  This browser can't display the SVG file svg/option_estimate_blocking_state_not_blocked.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if (
(obstacle.distance_in_direction( ball.angle() ) < 2000)
&& 
(obstacle.distance_in_direction( ball.angle() ) < (ball.distance() - 100))
)
{
  
goto blocked;
}
else
{
  
/** */
if (
(obstacle.obstacle_distance.left() < 200)
|| 
(obstacle.obstacle_distance.middle() < 200)
|| 
(obstacle.obstacle_distance.right() < 200)
)
{
  
/** */
if ( strategy.blocking_penalty >= 5000)
{
  
goto blocked;
}
else
{
  
goto increase_block;
}
}
else
{
  
/** */
if ( true)
{
  
/** */
if ( strategy.blocking_penalty < 0)
{
  
goto not_blocked;
}
else
{
  
goto decrease_block;
}
}
else
{
  
stay;
}
}
}

State decrease_block

If that state is active,
 >  This decimal output symbol is set:
    strategy.blocking_penalty  = 
(strategy.blocking_penalty - 200)
 
The decision tree:
  This browser can't display the SVG file svg/option_estimate_blocking_state_decrease_block.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if (
(obstacle.distance_in_direction( ball.angle() ) < 2000)
&& 
(obstacle.distance_in_direction( ball.angle() ) < (ball.distance() - 100))
)
{
  
goto blocked;
}
else
{
  
/** */
if (
(obstacle.obstacle_distance.left() < 200)
|| 
(obstacle.obstacle_distance.middle() < 200)
|| 
(obstacle.obstacle_distance.right() < 200)
)
{
  
/** */
if ( strategy.blocking_penalty >= 5000)
{
  
goto blocked;
}
else
{
  
goto increase_block;
}
}
else
{
  
/** */
if ( true)
{
  
/** */
if ( strategy.blocking_penalty < 0)
{
  
goto not_blocked;
}
else
{
  
goto decrease_block;
}
}
else
{
  
stay;
}
}
}

State increase_block

If that state is active,
 >  This decimal output symbol is set:
    strategy.blocking_penalty  = 
(strategy.blocking_penalty + 100)
 
The decision tree:
  This browser can't display the SVG file svg/option_estimate_blocking_state_increase_block.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if (
(obstacle.distance_in_direction( ball.angle() ) < 2000)
&& 
(obstacle.distance_in_direction( ball.angle() ) < (ball.distance() - 100))
)
{
  
goto blocked;
}
else
{
  
/** */
if (
(obstacle.obstacle_distance.left() < 200)
|| 
(obstacle.obstacle_distance.middle() < 200)
|| 
(obstacle.obstacle_distance.right() < 200)
)
{
  
/** */
if ( strategy.blocking_penalty >= 5000)
{
  
goto blocked;
}
else
{
  
goto increase_block;
}
}
else
{
  
/** */
if ( true)
{
  
/** */
if ( strategy.blocking_penalty < 0)
{
  
goto not_blocked;
}
else
{
  
goto decrease_block;
}
}
else
{
  
stay;
}
}
}

State blocked

If that state is active,
 >  This decimal output symbol is set:
    strategy.blocking_penalty  = 
5000
 
The decision tree:
  This browser can't display the SVG file svg/option_estimate_blocking_state_blocked.svg.



The Adobe SVG Viewer 3.0 can be downloaded from http://www.adobe.com/svg/viewer/install/main.html
 
Pseudo code of the decision tree:
 
/** */
if (
(obstacle.distance_in_direction( ball.angle() ) < 2000)
&& 
(obstacle.distance_in_direction( ball.angle() ) < (ball.distance() - 100))
)
{
  
goto blocked;
}
else
{
  
/** */
if (
(obstacle.obstacle_distance.left() < 200)
|| 
(obstacle.obstacle_distance.middle() < 200)
|| 
(obstacle.obstacle_distance.right() < 200)
)
{
  
/** */
if ( strategy.blocking_penalty >= 5000)
{
  
goto blocked;
}
else
{
  
goto increase_block;
}
}
else
{
  
/** */
if ( true)
{
  
/** */
if ( strategy.blocking_penalty < 0)
{
  
goto not_blocked;
}
else
{
  
goto decrease_block;
}
}
else
{
  
stay;
}
}
}