module documentation

This Python module defines the GraphEnvironment abstract class, which encapsulates the concept of a reinforcement learning (RL) environment for graph theory applications, together with an associated enumeration describing the possible episode statuses.

Class EpisodeStatus This enumeration represents the possible statuses of an episode in a reinforcement learning environment for graph theory applications.
Class GraphEnvironment This abstract class encapsulates the concept of a reinforcement learning (RL) environment for graph theory applications. Such an environment is designed to address extremal problems in which a specified graph invariant is to be maximized over a finite family of fully colored ...
Type Alias GraphInvariant This is a type alias for functions that compute the values of a graph invariant for a given batch of graphs. Such functions accept a Graph object representing a batch of graphs and return a one-dimensional ...
Type Alias GraphInvariantDiff This is a type alias for functions that compute element-wise differences of a given graph invariant between two batches of graphs. Such functions accept two Graph objects representing the two batches and return a one-dimensional ...
GraphInvariant =

This is a type alias for functions that compute the values of a graph invariant for a given batch of graphs. Such functions accept a Graph object representing a batch of graphs and return a one-dimensional numpy.ndarray of type numpy.float32, whose length equals the batch size and whose entries are the computed graph invariant values.

Value
Callable[[Graph], np.ndarray]
GraphInvariantDiff =

This is a type alias for functions that compute element-wise differences of a given graph invariant between two batches of graphs. Such functions accept two Graph objects representing the two batches and return a one-dimensional numpy.ndarray of type numpy.float32.

Specifically, the i-th entry of the output must equal the value of the graph invariant for the i-th graph in the second batch minus the value of the same invariant for the i-th graph in the first batch. The two batches must have the same size, and the corresponding graphs must have the same order, the same number of proper edge colors, and the same graph type, meaning that they are either all directed or all undirected, and either all allow loops or all disallow them.

Value
Callable[[Graph, Graph], np.ndarray]