/ Модель

Характеристики

Лицензия
Apache 2.0
Архитектура
mr_pong · dense
Опубликована
17 авг 2026

MrPong

Обучение с подкреплением3 профессии

Агент обучения с подкреплением для управления ракеткой и игры в 2D-пинг-понг.

50скачиваний за 30 дней12лайковвеса обновлены26 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Mr. Pong — агент обучения с подкреплением для игры в настольный теннис, опубликованный пользователем fromziro. Модель использует плотную нейросеть типа MLP с общей частью Actor-Critic: она обрабатывает 16-мерное векторное наблюдение и выбирает одно из трёх действий — оставаться на месте, двигаться вверх или вниз. В README указаны скрытый размер 160 и три слоя; описание архитектуры также упоминает два скрытых слоя по 192 нейрона, поэтому эти сведения расходятся.

Агент предназначен для управления ракеткой в 2D-игре в пинг-понг. Его обучали против логических соперников разной сложности, алгоритмов minimax, случайного агента и собственных прошлых и текущих версий. В README заявлен уровень игры гроссмейстера, но результаты оценки не приведены. Модель принимает числовые наблюдения состояния и выдаёт решение о действии; это специализированный игровой агент, а не языковая модель. Лицензия — Apache-2.0.

Сценарии применения

  • управление ракеткой в игре в пинг-понг
  • выбор движения ракетки по координатам и скорости мяча
  • эксперименты с self-play в настольном теннисе
  • сравнение игровой политики с логическими и minimax-соперниками

Ограничения

Агент рассчитан на описанную 2D-игру и пространство из трёх действий; применимость к другим средам не показана. Заявление о гроссмейстерском уровне не сопровождается результатами оценки, а README содержит противоречивые сведения о размере скрытых слоёв.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Mr. Pong

In the realm of Ping Pong, Mr. Pong is no ordinary paddle. Feared across the table as the Blue Beast, he commands every rally with ruthless precision, striking despair into the hearts of all who dare face him.

In other words, he is a reinforcement learning (RL) agent trained to compete at a grandmaster level in Ping Pong.

Model Architecture

  • Base Architecture: MrPongMLPForRL
  • Hidden Size: 160
  • Observation Size: 16
  • Number Of Layers: 3
  • Action Space: 3 (stay, up, down)
  • Activation: tanh

Mr. Pong uses a shared Actor-Critic MLP designed for 2D table tennis control. The 16-dimensional observation vector is passed through two hidden layers of 192 units each, with Tanh activations between them. The resulting 192-dimensional representation is shared by both the actor and critic heads. The actor outputs categorical logits across the 3 movement actions (stay, up, down), while the critic uses the same representation to estimate the scalar state value V(s). This shared setup keeps the network small and fast on CPU while letting the model combine ball coordinates, velocities, paddle momentum, raycasted intercept points, and opponent court openings into a single control decision.

Training Configuration

  • Number of Environments: 12
  • Rollout Steps: `128
  • PPO Epochs: 4
  • Minibatch Size: 64
  • Gamma: 0.99
  • GAE Lambda: 0.95
  • Clip Coefficient: 0.20
  • Value Coefficient: 0.50
  • Entropy Coefficient: 0.02
  • Maximum Gradient Norm: 0.75
  • Learning Rate: 3.5e-4
  • Adam Epsilon: 1e-5
  • Anneal Learning Rate: true
  • Total Timesteps: 10,000,000
  • Maximum Rally Steps: 1500

Training Opponents

  • Realistic Hard Logic (human-like perception horizon and bounce raycasting)
  • Medium Logic (linear trajectory extrapolation)
  • Minimax Lookahead (depth 1 and depth 2)
  • Current Self-Play (mirror matches against the active policy)
  • Historical Self-Play (past checkpoints sampled between 5 and 75 saves ago)
  • Easy Logic (reaction delay with targeting noise)
  • Impossible Hard Logic (0ms reaction time)
  • Random Agent

Training Results

Opponent NameWin %Draw %Loss %Record (W / D / L)Avg Rally
Easy Logic99.7%0.0%0.3%997W / 0D / 3L1.7 hits
Medium Logic99.0%0.2%0.8%990W / 2D / 8L17.3 hits
Realistic Hard86.6%8.1%5.3%866W / 81D / 53L33.9 hits
Impossible Hard0.0%98.4%1.6%0W / 984D / 16L64.8 hits
Minimax Depth 143.0%55.8%1.2%430W / 558D / 12L32.2 hits
Minimax Depth 278.4%20.3%1.3%784W / 203D / 13L23.7 hits
Random Agent100.0%0.0%0.0%1000W / 0D / 0L0.9 hits
Self-Play Mirror1.6%96.1%2.3%16W / 961D / 23L50.5 hits

Mr. Pong has demonstrated the he has mastered the game Ping Pong; losing only <=5% of games.

Inference

First install the required dependencies:

pip install torch transformers

Next, download inference.py and run:

python inference.py
  • Use --mode play to play against the agent live in the terminal.
  • Use --mode simulate to run AI match simulations (default).
  • Add --opponent to choose a specific opponent (realistic_hard, medium, minimax_d1, minimax_d2, impossible_hard, easy, random).
  • Add --video to export an MP4 recording of the match.

License

Apache 2.0.

Citation

@misc{mrpong,
  title        = {Mr. Pong: Teaching RL agents to Play Ping Pong},
  organization = {FromZero},
  authors      = {Paul Courneya},
  year         = {2026},
  url          = {https://huggingface.co/fromziro/MrPong]
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

RL-агенты не запускаются как сервис инференса.

Класс архитектуры
MrPongForRL
Ревизия весов
d94ab4c

0 моделей