Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified button pushes to be probabilities #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

snawara
Copy link

@snawara snawara commented Feb 14, 2017

Currently the network returns a value approximately between 0-1 and this is rounded to either push the button (1) or not (0). Instead, I tried truncating the value to between 0-1 and interpreting this as a probability. The probability is used by np.random.choice to pseudorandomly choose whether to press the buttons during each update, the resulting 0/1 is then sent as the controller instruction.

@snawara
Copy link
Author

snawara commented Feb 15, 2017

Thanks for your patience as I figure out git, etc. It looks like there is a conflict but it is only regarding a comment.

@kevinhughes27
Copy link
Owner

Hmm I tried to fix the conflicts but it didn't work 100%. I think you'll have to fix this locally

int(round(joystick[4])),
int(joystick[2]),
int(joystick[3]),
int(joystick[4])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be possible to implement this as a single function call that we use here instead of round? I'd like to explore that rather than adding all this code into the main loop.

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.

None yet

2 participants