24 lines
742 B
Python
24 lines
742 B
Python
from negotiation_agent.environment import NegotiationEnv
|
|
from typing import Tuple
|
|
import numpy as np
|
|
|
|
def execute_step_usecase(env: NegotiationEnv, action: int) -> Tuple[np.ndarray, float, bool, bool, dict]:
|
|
"""
|
|
환경에서 행동을 실행하고 결과를 반환하는 유스케이스
|
|
|
|
Args:
|
|
env (NegotiationEnv): 협상 환경 인스턴스
|
|
action (int): 수행할 행동 (0-8)
|
|
|
|
Returns:
|
|
Tuple[np.ndarray, float, bool, bool, dict]:
|
|
- 다음 상태
|
|
- 보상
|
|
- 종료 여부
|
|
- truncated 여부
|
|
- 추가 정보
|
|
"""
|
|
next_state, reward, done, truncated, info = env.step(action)
|
|
|
|
return next_state, reward, done, truncated, info
|