gflownet.proxy.toy

Reward for the Toy environment.

The class allows for the assignment of proxy values for each state independently.

Arbitrarily, the default values are approximately equal to the number of particles reaching the final states in Figure 2 of the GFlowNet Foundations paper.

Classes

ToyScorer

Module Contents

class gflownet.proxy.toy.ToyScorer(values={3: 30, 4: 14, 6: 23, 8: 10, 9: 30, 10: 5}, **kwargs)[source]

Bases: gflownet.proxy.base.Proxy

Parameters:

values (dict) – The proxy values for each state. The keys are the indidices of each state and the values are the proxy values assigned to them.

values_dict[source]
setup(env=None)[source]

Builds a tensor of scores for each state of the environment.

Parameters:

env (GFlowNetEnv) – An instance of the Toy environment

__call__(states)[source]

Implement this function to call the get_reward method of the appropriate Proxy Class (EI, UCB, Proxy, Oracle etc).

Parameters:

states (ndarray)

Return type:

torchtyping.TensorType[batch]