Skip to content

Stochastic actions - #4

Open
Tia-Chen wants to merge 2 commits into
mainfrom
stochastic_actions
Open

Stochastic actions#4
Tia-Chen wants to merge 2 commits into
mainfrom
stochastic_actions

Conversation

@Tia-Chen

@Tia-Chen Tia-Chen commented Apr 1, 2024

Copy link
Copy Markdown
Collaborator

FUNCTIONALITY:
This feature allows for noise to be added to actions. Default noise is none. User can input desired noise by providing a txt file that contains of the probability of results of different actions and the likelihood of those actions happening instead of the intended action. Thereby introducing noise.

HOW TO USE:

  1. Use the --stochastic flag when running the environment simulator. This will prompt you for a file that contains the stochastic information.

  2. Stochastic file (required)
    The file format is:

ACTION_NAME:[tab]ALTERNATIVE_ACTION_NAME[space]PROBABILITY[tab]ALTERNATIVE_ACTION_NAME...

The probability for each command is separated by a newline. The file should have no trailing spaces at the end of each line and no trailing empty newline at the end of the file.

For an example, please see stochastic_probability.txt

***These probabilities are relatively weighted. If you assign for INTERACT: INTERACT -- 0.3 and NOP -- 0.3, it will be equally likely that either of them are executed when the INTERACT command is called. This would be equivalent to INTERACT: INTERACT -- 3, NOP -- 3. The probability is calculated using:
probability of an action = (value of single action / (sum value of all actions possible)

HOW TO TEST:

  1. Edit the probability corresponding to each action in stochastic_probability.txt. For example, editing the probability of SOUTH being executed to be 1 for the action NORTH and NORTH to be 0 would result in the SOUTH action being performed whenever NORTH is requested.
  2. You can also give different actions different probabilities to see more interesting behaviors. Giving the NORTH command a .5 for SOUTH and .5 for NORTH will make it go repeatedly up and down when the up button is held because the probability is equal for either actions to happen.

ISSUES/FOLLOW-UP:

  1. What are the possible alternative actions that we want for NOP and RESET? Should there be any? Currently there are no other actions possible when NOP and RESET are called by default. This means that they will be executing with perfect accuracy for those two actions.

Offers default probability (noise-less) or user given probability that can be loaded from file
@Tia-Chen
Tia-Chen marked this pull request as ready for review April 1, 2024 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant