sciencegym.simulations.Simulation_Basketball module¶
- class sciencegym.simulations.Simulation_Basketball.Ball(world, x, y, angle, velocity, radius=1.0, density=1.0, delta_x=0, delta_y=0)¶
Bases:
object
- create_ball()¶
- get_state()¶
- get_world()¶
- class sciencegym.simulations.Simulation_Basketball.Basket(world, x=38, y=20, radius=1.5, width=0.2)¶
Bases:
object
- create_basket()¶
- get_state()¶
- get_world()¶
- class sciencegym.simulations.Simulation_Basketball.Sim_Basketball(*args: Any, **kwargs: Any)¶
Bases:
EnvironmentInterface
- alter_state(state)¶
- getReward()¶
- Returns:
- get_action_space()¶
Return a gymnasium.spaces.Space
- get_current_state()¶
Returns an array representing the current status of the simulation.
- get_state_space()¶
Returns a gymnasium.spaces.Space containing the ranges of the state space.
- performAction(action)¶
perform the actual action from the step function
- Parameters:
action – ActType
- Returns:
- printSuccess()¶
return message, if we have a match or a successful outcome
- Returns:
- Return type:
str
- rescaleState(state=None)¶
Normalize the state
- Parameters:
state – State that should be normalized
- Returns:
nromalized state
- Return type:
??
- reset()¶
Resets the simulation to the initial conditions and returns the initial conditions of the new environment, alongside additional information.
- set_initial_speed(action)¶
- set_intial_angle(action)¶
- step_injection(action)¶
- success()¶
Has the experiment succeeded?
- Returns:
True if success, else False
- Return type:
bool
- testFailed()¶
Only overwrite, if there is an opportunity that the experiment might be at a point where it cannot succeed anymore.
- Returns:
True, if the test fails, else False
- Return type:
bool
- updateState()¶
Reset the state
- Returns:
updated state
- Return type:
??