**Understanding the Relationship Between `MotorSystemConfig`s, Motor Policies, and Hypothesis-Driven Control in Monty**

Hi everyone,

I’m quite confused about the difference between MotorSystemConfig(s) and motor policies.

From my understanding, MotorSystemConfig is built on motor policies and is what the code uses instead of using motor policies directly. If that’s accurate, then when I’m interested in comparing motor policies I can’t do it directly; I have to compare MotorSystemConfig instances instead — at least when using the code from the tutorials on the website.

For example, if I want to compare InformedPolicy and SurfacePolicyCurvatureInformed, I used MotorSystemConfigInformedNoTrans (which implements InformedPolicy) and MotorSystemConfigCurInformedSurfaceGoalStateDriven (which implements SurfacePolicyCurvatureInformed). Is it accurate to say I’m comparing Monty’s motor policies? Especially since there are other different parameters in MotorSystemConfig that aren’t equalized between the two configurations.

Another thing regarding HypothesisDrivenPolicyMixin: it isn’t listed in the policy_class= section of any MotorSystemConfig, but the documentation says:

“The hypothesis-driven policy is implemented as a mixin, such that it can be adopted by a variety of other core policies, such as the informed distant-agent policy or the surface-agent curvature-informed policy.”

Does this mean it’s implemented in a different way? For example, in MotorSystemConfigCurInformedSurfaceGoalStateDriven there is use_goal_state_driven_actions = True. Does that mean it uses a hypothesis-driven policy? Is that the same as HypothesisDrivenPolicyMixin? If so, does it mean two different policies are being used?

Thanks — Happy New Year!

2 Likes

Hi @Ziad_Alenna,

Apologies for the confusion, the configurations need improvements.

First, I’d like to verify that you are looking at the latest version of the code. MotorSystemConfig and other MotorSystemConfig* classes are no longer in tbp.monty.

I’m confused by what you mean by comparing motor policies. Could you share a bit more about what you are doing when you are comparing motor policies? Are you running two experiments where you swap out policies and comparing the results? I’m going assume that’s what comparison means for the rest of my reply.

The MotorSystem is a very thin wrapper around policies. It is in place to support swapping out policies at runtime (something we’re working on right now). When I look at informed_no_trans.yaml and cur_informed_surface_goal_state_driven.yaml, all the differences are in policy_class and policy_args. There are different parameters in policy_args because different policies use different parameters. So, yes, I think it is accurate to say you’re comparing Monty’s motor policies.

Regarding HypothesisDrivenPolicyMixin, I think that is a leftover in the documentation from a long time ago as it doesn’t appear anywhere in the code (update: it looks like this should be JumpToGoalStateMixin in the documentation, I’m updating it).

Regarding use_goal_state_driven_actions, that is a flag that will use JumpToGoalStateMixin inside InformedPolicy or any policy inheriting from InformedPolicy.

4 Likes

One update… it looks like HypothesisDrivenPolicyMixin is the wrong name and should be JumpToGoalStateMixin.

3 Likes

I’m impressed with your naming conventions. Software is a language and literature needs to be readable. :+1:

1 Like