Skip to content

Action Combinations

Devendra Chaplot edited this page Nov 23, 2017 · 2 revisions

Action Combinations

Create the set of possible actions given the allowed action combinations. An action is a combination of one or several buttons.

  • The '+' merges buttons that should not be triggered together.

  • The ';' separates groups of buttons that can be triggered simultaneously.

For example:

Input:

    'turn_lr+move_fb;move_lr'

Output:

    [['MOVE_LEFT'],
     ['MOVE_RIGHT'],
     ['TURN_LEFT'],
     ['TURN_LEFT', 'MOVE_LEFT'],
     ['TURN_LEFT', 'MOVE_RIGHT'],
     ['TURN_RIGHT'],
     ['TURN_RIGHT', 'MOVE_LEFT'],
     ['TURN_RIGHT', 'MOVE_RIGHT'],
     ['MOVE_FORWARD'],
     ['MOVE_FORWARD', 'MOVE_LEFT'],
     ['MOVE_FORWARD', 'MOVE_RIGHT'],
     ['MOVE_BACKWARD'],
     ['MOVE_BACKWARD', 'MOVE_LEFT'],
     ['MOVE_BACKWARD', 'MOVE_RIGHT']]

In continuous mode, all actions can be selected simultaneously, so there should be no "+" in the action combinations.

Clone this wiki locally