jara001 / ng_trajectory

Racing Line Optimization using Nevergrad
GNU General Public License v3.0
7 stars 4 forks source link

Flood Fill merging #13

Open jara001 opened 2 years ago

jara001 commented 2 years ago

Currently tested curvature-based selection (and segmentation) uncovered another issue with the used segmentator.

When the selection is uneven, it can happen, that one segment 'gets trapped' because of another segment spreading outside its proper area. This can be show, e.g., in the following image:

matcur2-03-2-matryoshka

{
    "_version": 2,
    "_comment": "Experiment with MM and Curvature2.",
    "loops": 10,
    "groups": -3,
    "interpolator": "cubic_spline",
    "segmentator": "flood_fill",
    "selector": "curvature2",
    "selector_args": {
        "plot": false,
        "point_distance": 0.1,
        "sampling_distance": 1.0,
        "peaks_height": 1.0,
        "peaks_distance": 16,
        "peaks_bounds": 8,
        "peaks_filling": 7.0
    },
    "cascade": [
        {
            "algorithm": "matryoshka",
            "budget": 3000,
            "layers": 5,
            "criterion": "profile",
            "criterion_args": {
                "overlap": 100
            },
            "criterion_init": {
                "_dummy": 0
            }
        },
        {
            "algorithm": "matryoshka",
            "budget": 1000,
            "layers": 5,
            "criterion": "profile",
            "criterion_args": {
                "overlap": 100
            },
            "criterion_init": {
                "_dummy": 0
            }
        }
    ],
    "start_points": "ng_start_points_torino2.npy",
    "valid_points": "ng_valid_points_torino2.npy",
    "logging_verbosity": 2,
    "hold_map": true,
    "plot": true,
    "plot_args": [
        {
            "_figure": {
                "function": "axis",
                "_args": [ "equal" ]
            },
            "trackPlot": [ "@track" ],
            "pointsPlot": {
                "_args": [ "@result" ]
            }
        },
        {
            "pointsPlot": {
                "_args": [ "@result" ]
            },
            "pointsScatter": {
                "_args": [ "@rcandidate" ]
            }
        }
    ],
    "prefix": "matcur2"
}