Firming the bedrock

One of the core underlying issues had been the fitness function assessment. This was partially due to the placeholder nature of the initial implementation but also due to how the pathing data was handled; the use of the ‘optimum path’ score meant that the implemented modifiers for visibility were considered. In order to ensure paths avoided areas of visibility, extremely large modifiers were applied when paths included areas within varying sight tolerances.

This has been addressed with a new method that will give an approximation (node steps only – ie. the angled movement is just 1 instead of 1.4 times) as to how much of a path lies within a certain visibility threshold (passed as a parameter).

Preprocessing

This is now incorporated into the SBF preprocessing stage; rather than allow any location with LOS to the enemy position, it will restrict candidate locations to those with less than X meters of the route through an area with less than Y visibility threshold. The previous preprocessing for SBF candidates is below.

Candidate FUP based on previous preprocessing

When the preprocessing is updated to consider the path as discussed above, it results in a much better SBF candidate list, as seen below.

Candidate SBF locations based on updated pre processing

The no free lunch rule does apply here however. The preprocessing used in the first image took ~33 seconds whereas the time for the preprocessing stage now (giving the results in the second image) is ~ 2 minutes. The test above was done on a terrain sampling that would align to a 5km x 5km space sampled at 5m spacing. The obvious advantage here however is the significantly more optimised search space. Specifically the candidate SBFs have been reduced (in this example) from 3797 to 1542; more than 50% of generated plans then would be tactically unsound without this preprocessing.

Fitness function

The previous fitness functions were created on the fly and initially placeholders that were massaged to give reasonable results. Unfortunately they were not very effective and had a wide range of outputs without any coherent way to tune them (FUP fitness, SBF fitness and Plan fitness)

This has been updated with a more mathematical approach in an attempt to (generally) range a fitness of between 0 and 1 for each. Note this is not a hard cap but it does generally align well and allows more deliberate tweaking of parameters.

Fitness function algorithms are as follows:

FUP Score = 1 – (AssaultDistance/ 600)

SBF Score; If distance to enemy position is:

< 100m = DistanceToEnemy / 1000

Max score of 0.1

< 250m = (DistanceToEnemy – 100) * 0.005 + 0.1

0.1 @ 100m

0.8 at 250m

< 400m = 1 – (AbsoluteValue(DistanceToEnemy– 325)) * .002

Peaking at a value of 1 at 325m

Slow falloff to 0.85 at 250m and 400m

> 400m = 0.85 – (DistanceToEnemy – 400) * .0057

Falls off rapidly to 0 (capped at 0) at 550m

Further, once this value is calculated, a preference for higher terrain is applied:

Combination: Based off individual scores and angle. Angle converted to 0-90 degrees then normalised to values between 0 and 1, where 1 indicates an angle of 0 degrees and 0 indicates an angle of 90 degrees.

The result of today’s work is positive. One major error with the math helper class was it was considering angles only on magnitude; The example that highlighted this was where the axis of assault was ~30 mils and the fire support bearing was ~6020 mils, the function returned a bearing of 5990 mils which was then (blindly) used in the fitness function, resulting in a high score; in reality the angle of ~410 mils is VERY poor. This is now fixed, both in the math helper class AND in the fitness function.

Major areas that can be tinkered with:

Height preference of SBF; just how much influence height superiority has for SBF locations

Angle preference for plans. Appears quite reasonable currently

Overall though, a net win. Indeed in some tests the plan output seemed a bit off until I reoriented the camera to get a better ground appreciation of the terrain (‘walking it’); the plan developed was quite sound and took advantages of not immediately obvious terrain undulations. Promising!

Two example plans on different terrains:

Plan developed on main test terrain with updated fitness function. SBF is the darker location to the right, FUP is in the dead ground to the upper left.Plan developed on new terrain with updated fitness function. SBF is the darker location in the middle. FUP is in behind the rise overlooking the enemy to the left.