mit-uav / ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ensuring uniformity of steps in domain

brandonwang15 opened this issue · comments

Right now when the UAV taps, its tapping takes more than one step, so in the following steps it is still in the middle of tapping. This means that in the next step the UAV shouldn't try to reevaluate it's state to find it's next action - because it's still doing something. Our current solution is to simply skip the simulation a few steps ahead. The plan is to instead to allow to UAV to evaluate on every time step, this way it's a little less hacky and prevents the case where a UAV is tapping a roomba, the roomba triggers a 180, and the UAV stays for duration of the turn + 180 instead of just the turn. The new mechanism for turns is to just "knock out" the uav for the step duration of a turn but still evaluate each individual turn.

Solution: add an attribute to uav called ko_steps_remaining:

in each step evaluation, if ko_steps_remaining == 0 then don't evaluate anything or move the uab on this step and decrement ko_steps_remaining

ko_steps_remaining can be set to a positive # whenever there is a uav action that shouldn't be interrupted takes longer then 1 step (like turning)