johbrust / simulink_gym

Gym Interface Wrapper for Simulink Models
https://quire.io/w/Simulink_Gym
MIT License
14 stars 0 forks source link

A question on the dim and dtype of action. #5

Closed lk1983823 closed 1 year ago

lk1983823 commented 1 year ago

I have successfully run the cartpole_simulink.ipynb file. Now I have two questions:

  1. In the step method in cartpole_simulink.py, I find you define action = int(action) in line 119. Is it due to just the action.space requirentment or the TCP/IP sending requirements. If I train a RL model with float type action, will it have any problem?
  2. In the cartpole example, the dimension of action is only one. If I have action with multiple dimensions, will there be any fix in simulink_block_lib? Can you help to specify how to fix it? Or suggest to add an example with more than one dimension with float dtype. Thanks.