Skip to content

Instantly share code, notes, and snippets.

Elias Hasle EliasHasle

Block or report user

Report or block EliasHasle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@EliasHasle
EliasHasle / Retro_SMB_Wrapper.py
Last active Apr 14, 2019
Retro SuperMarioBros-Nes wrapper that skips busy frames and converts to discrete action space (alpha, not thoroughly tested)
View Retro_SMB_Wrapper.py
#Inspired by
#https://github.com/Kautenja/nes-py/blob/master/nes_py/wrappers/binary_to_discrete_space_env.py
#and
#https://github.com/openai/retro-baselines/blob/master/agents/sonic_util.py
#but copying directly from neither.
#Requires retro.
#Requires SuperMarioBros NES rom (USA/Japan). Once you have it, can be imported to retro:
#> python -m retro.import directory_name
#(identifies the ROM if it is there and has the .nes extension.)
@EliasHasle
EliasHasle / ball_bounce.m
Created Oct 7, 2017
Matlab function to calculate exact vertical position and velocity of a single bouncing ball (with given coefficient of restitution less than one) at any time or array of times
View ball_bounce.m
%@EliasHasle
%There probably is room for more optimization in the form of vectorization.
%You see, Matlab is not my first language.
function [ values ] = ball_bounce( initials, k, tt)
%Input:
%initials: column vector of initial vertical position and velocity
%k: coefficient of restitution (must be less than one)
%tt: array of times
%
You can’t perform that action at this time.