easyiec.problems.PathPlanning#

class easyiec.problems.PathPlanning(n_via=5, n_obstacles=8, seed=0, robot_radius=0.02)[source]#

Bases: Problem

A robot path through a field of circular obstacles.

The genome holds via-points of a centripetal Catmull–Rom spline from the start (lower left) to the goal (upper right). objectives() reports the length, the minimum clearance (negative inside obstacles), the collision length and the curvature; via-points are draggable handles.

apply_edit(x, handles)[source]#

Genome after the knots were moved to handles.

edit_handles(x)[source]#

Knot points (k, 2) a person can drag (problems with editable curves).

features(x)[source]#

Phenotype features in psychological space (default: image features).

objectives(x)[source]#

Key performance indicators (engineering problems); empty by default.

presets()[source]#

Named, hand-picked genomes ({name: genome}) for seeding and demos.

random(rng, n=None)[source]#

Via-points scattered around the straight line (random detours, not random zigzags).

render_plot(x, ax)[source]#

Plot-type phenotypes (curves, layouts) draw here; used by _image().

utility(x, target=None)[source]#

Default hidden utility in [0, 1] (ground truth of benchmarks).

With a target genome it is a Gaussian similarity of standardized phenotype features; subclasses with explicit objectives override it.

Examples using easyiec.problems.PathPlanning#

Fuzzy partitions and robot paths: geometry an expert can judge

Fuzzy partitions and robot paths: geometry an expert can judge