rl_equation_solver.utilities.utilities.to_vec

to_vec(expr, feature_dict, state_dim=4096)[source]

Get state vector for given expression

Parameters:
  • expr (str) – State string representation

  • feature_dict (dict) – Dictionary mapping feature names to values

  • state_dim (int) – Max length of state vector

Returns:

np.ndarray – State vector array