skat-ml-models / README.md
avaskys's picture
Upload README.md with huggingface_hub
59618f7 verified
metadata
library_name: onnxruntime
license: mit
tags:
  - skat
  - card-game
  - onnx
language:
  - en

Skat ML Models

Models for playing the German card game Skat, trained on ~9 million games from the International Skat Server (ISS).

Models

Model Architecture Description Size
bidding_dense Dense ResNet Pre-skat bidding evaluation ~9 MB
bidding_transformer Transformer Pre-skat bidding with attention ~14 MB
game_eval_dense Dense ResNet Post-skat game type selection ~9 MB
game_eval_transformer Transformer Post-skat evaluation with attention ~13 MB
card_play_transformer Transformer Card play selection ~72 MB

Gameplay Phases

Skat has three decision phases, each with its own model:

  • Bidding — "Can I win at bid level X?" Evaluates win probability across all 63 bid levels.
  • Game selection — "Which discards + game type maximize win probability?" Evaluates after winning the bid.
  • Card play — "Which card should I play?" Selects from legal cards during tricks.

Model Details

Model Input Output
BiddingEvaluator 35 features (10 cards + position) 63 × 2 win probs (pickup/hand)
BiddingTransformer 10 card indices + position 63 × 2 win probs (pickup/hand)
GameEvaluator 75 features (hand + skat + context) 1 win probability
GameEvaluatorTransformer Card indices + context 1 win probability
CardPlayTransformer Sequence of moves 32 card logits

Interface Specification

The interface/ directory defines the contract for using these models:

  • feature_spec.json — Card encoding, game type encoding, input/output tensor shapes
  • test_vectors.json — Reference inputs and expected outputs for validation

Use these to ensure your implementation encodes inputs correctly.

Usage

Load with ONNX Runtime in any supported language (Python, Java, C++, etc.):

import onnxruntime as ort

session = ort.InferenceSession("bidding_transformer.onnx")

Training

Models were trained with rating-weighted loss using ISS player ELO ratings, so decisions from stronger players contribute more to the learned policy.

For training code and details, see the GitHub repository.

License

MIT