smc

Coverage Algorithms for Multi-Agent Systems

View project on GitHub

Dynamic Coverage of a moving target distribution

Dyamic SMC can be used to cover moving target distributions as well. Here is one such example:

# After necessary imports
# Define probability distribution
prob_dist = ProbDist()

# Define DynamicSMC coverage object
dynamic_smc = DynamicSMC(prob_dist)

# add one agent to coverage object
dynamic_smc.add_agent(Agent(0.1, 0.1))

# Run the algorithm (1000 time-steps while changing distribution)
for time_ind in range(1000):

    center1 = (0.2 + time_ind * target_speed, 0.2)
    center2 = (0.2 + time_ind * target_speed, 0.8)
    circle_radius = 0.1

    # set everything to zero
    prob_dist.set_zero()
    # set distribution on first moving circle
    prob_dist.set_value_in_circle(center1[0], center1[1], circle_radius, 1.0)
    # set distribution on second moving circle
    prob_dist.set_value_in_circle(center2[0], center2[1], circle_radius, 1.0)

    dynamic_smc.time_steps(1, 0.02)

Below is shown an animation of the trajectories exploring the moving target distribution using Dynamic SMC. The red circles represent the moving targets. To see the full code for this example, look here. Also, for a variant of Dynamic SMC that utilizes the knowledge of the target dynamics, see this paper here. This variant of Dynamic SMC has not been implemented with this library.

dynamic_smc_moving_target