The soldier uses fuzzy inference to determine the best weapon based on the distance to the enemy and the available ammo.