email_support / customer_env.py
pawan2007's picture
Upload 4 files
73444a5 verified
Raw History Blame Contribute Delete
540 Bytes
class CustomerEnv:
def __init__(self):
self.state = None
self.max_steps = 5
self.current_step = 0
def reset(self):
self.state = [1, 2, 3, 4] # simple fixed state
self.current_step = 0
return self.state
def step(self, action):
reward = 1.0 if action == 1 else -0.5
self.current_step += 1
done = self.current_step >= self.max_steps
# safe update
self.state = [x + action for x in self.state]
return self.state, reward, done, {}