Factory function that builds a TensorFlow Agents SAC reinforcement learning agent.
# Source: https://github.com/google/sbsim | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""Reinforcement learning - Soft Actor Critic (SAC) agent."""
from typing import Optional, Sequence
import tensorflow as tf
from tf_agents.agents import tf_agent
from tf_agents.agents.sac import sac_agent
from tf_agents.networks import network
from tf_agents.typing import types
from smart_control.reinforcement_learning.agents.networks.sac_networks import create_sequential_actor_network
from smart_control.reinforcement_learning.agents.networks.sac_networks import create_sequential_critic_network
def create_sac_agent(
time_step_spec: types.TimeStep,
action_spec: types.NestedTensorSp
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key