KT_Q_Table/usecases/get_q_value_usecase.py

6 lines
197 B
Python

from agents.offline_agent import QLearningAgent
class GetQValueUseCase:
def execute(self, agent: QLearningAgent, state: int, action: int) -> float:
return agent.q_table[state, action]