forked from facebookresearch/minimax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
agent.py
40 lines (29 loc) · 746 Bytes
/
agent.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""
Copyright (c) Meta Platforms, Inc. and affiliates.
All rights reserved.
This source code is licensed under the license found in the
LICENSE file in the root directory of this source tree.
"""
from abc import ABC
class Agent(ABC):
"""
Generic interface for an agent.
"""
@property
def is_recurrent(self):
pass
@property
def action_info_keys(self):
pass
def init_params(self, rng, obs, carry=None):
pass
def init_carry(self, rng, batch_dims):
pass
def act(self, *args, **kwargs):
pass
def get_action_dist(self, dist_params, dtype):
pass
def evaluate(self, *args, **kwargs):
pass
def update(self, *args, **kwargs):
pass