Downloads · 30 days
24
24% of all-time downloads
TensorAeroSpace/ihdp-f16
ihdp-f16 is a reinforcement learning model from TensorAeroSpace. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for tensoraerospace. The card lists the license as mit.
This repository contains an Incremental Heuristic Dynamic Programming (IHDP) agent trained for longitudinal control of the F-16, implemented with TensorAeroSpace.
Downloads · 30 days
24
24% of all-time downloads
All-time downloads
102
Public
Repo size
29.2 KB
Likes
1
Public
Click a slice to open those files.
.h528.6 KB · 79%
From the Hugging Face model README
This repository contains an Incremental Heuristic Dynamic Programming (IHDP) agent trained for longitudinal control of the F-16, implemented with TensorAeroSpace.
The agent tracks a step reference in angle of attack (alpha). It uses two neural networks (Actor and Critic) and an online incremental model to adapt features during rollout.
Saved artifacts (see this repository files):
config.json: environment and agent configuration (IO, actor/critic/incremental settings, optional reference signal snapshot)actor.h5: Keras weights for the Actor networkcritic.h5: Keras weights for the Critic networkincremental_model/:
F.npy, G.npy: incremental model matricesdelta_xt.npy, delta_ut.npy (if available): last gradients windows used during identificationimport os
import numpy as np
import gymnasium as gym
from tensoraerospace.agent.ihdp.model import IHDPAgent
# Load pretrained IHDP agent (either from local folder or HF Hub repo ID)
repo_id = "<username>/<repo_name>" # or path to a local saved folder
agent = IHDPAgent.from_pretrained(repo_id, access_token=os.getenv("HF_TOKEN"))
# Create F-16 longitudinal environment (must match config.json IO/params)
env = gym.make(
"LinearLongitudinalF16-v0",
number_time_steps=2002,
initial_state=[[0], [0], [0]],
reference_signal=np.zeros((1, 2002)), # replace with your reference
use_reward=False,
state_space=["theta", "alpha", "q"],
output_space=["theta", "alpha", "q"],
control_space=["ele"],
tracking_states=["alpha"],
)
# Example rollout (reference must be shaped [1, T])
obs, info = env.reset()
reference = env.unwrapped.reference_signal
for t in range(reference.shape[1] - 3):
u = agent.predict(obs, reference, t)
obs, r, terminated, truncated, info = env.step(np.array(u))
if terminated or truncated:
break
This model card is based on the notebook example/general_examples/example_ihdp_beautiful.ipynb with the following settings:
[theta=0, alpha=0, q=0]From the evaluation run in the notebook:
Control (elevator) statistics depend on limits and units used in the environment. Ensure your environment configuration matches config.json.
Artifacts were saved using IHDPAgent.save(...)/save_pretrained(...) and uploaded with IHDPAgent.push_to_hub(...) in TensorAeroSpace.
If you use this work, please cite TensorAeroSpace.
@software{TensorAeroSpace,
title = {TensorAeroSpace: Open source deep learning framework for aerospace objects},
author = {Mazaev, Artemiy and Davydov, Vasily and Li, Yakov},
year = {2025},
url = {https://github.com/mr8bit/TensorAeroSpace},
}