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

How to switch deep environment to tabular environment? #3

Open
bszeng opened this issue Dec 18, 2020 · 1 comment
Open

How to switch deep environment to tabular environment? #3

bszeng opened this issue Dec 18, 2020 · 1 comment

Comments

@bszeng
Copy link

bszeng commented Dec 18, 2020

Hi, I had some trouble when I was planning to simulate Q-Learning Algorithm for VoLTE Closed Loop Power Control in Indoor Small Cells. In order to switch to tabular environment, I did the following:

  1. Change the agent class
from environment import radio_environment
#from DQNLearningAgent import DQNLearningAgent as QLearner # Deep with GPU and CPU fallback
from QLearningAgent import QLearningAgent as QLearner
  1. Call the tabular function
#    run_agent_fpa(env)
    run_agent_tabular(env)
#    run_agent_deep(env)

I went through the code, but I didn't find a way to switch environments:

> Ep. | TS | Recv. SINR (srv) | Recv. SINR (int) | Serv. Tx Pwr | Int. Tx Pwr | Reward 
> ------------------------------------------------------------------------------------------------------------
> [-311.94796062  325.77365607  617.88366191 -146.98785931  2.94720088  13.78845061]    
> Traceback (most recent call last):
>   File "main_modify.py", line 592, in <module>
>     run_agent_tabular(env)
>   File "main_modify.py", line 56, in run_agent_tabular
>     action = agent.begin_episode(observation)
>   File "/home/nemo/workspace/Q-Learning-Power-Control/voice/QLearningAgent.py", line 52, in begin_episode
>     self.state = observation + np.zeros(self.state_size, dtype=int)
> ValueError: operands could not be broadcast together with shapes (6,) (3,) 

Does anyone know what to do with it?

@s-omid
Copy link

s-omid commented Jan 23, 2022

Hi, I have the same problem, did you find a solution to this?

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

No branches or pull requests

2 participants