YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

๐Ÿง  Battleship MLP Hit Predictor

This model predicts the probability that a given move in Battleship will result in a hit, based on a flattened feature vector representing the current board state, ship layout constraints, and spatial heuristics. It is designed for use in agentic game logic and can be integrated into automated Battleship agents for move selection, pruning, and top-k targeting.


๐Ÿ“ฆ Model Details

  • Architecture: Multi-Layer Perceptron (MLP)
  • Framework: Keras (TensorFlow backend)
  • Input: 1D vector of 16 engineered features (see below)
  • Output: Float between 0.0 and 1.0 (probability of hit)
  • Training Data: Flattened Battleship board states with labeled hit/miss outcomes
  • Performance:
    • AUC: 0.855
    • Average Precision: 0.747
    • F1 Score: 0.700
    • Precision: 0.747
    • Recall: 0.658

๐Ÿงฎ Input Features

The model expects a 1D vector of 16 features in the exact order listed in feature_list.txt. These features are extracted per candidate move using a flatten_record() function in your game logic. Example features include:

  • turn_number
  • coverage_count
  • num_ships_that_can_fit_here
  • is_horizontal_hit
  • is_vertical_hit
  • coverage_gradient
  • is_adjacent_to_hit
  • is_edge_cell
  • is_diagonal_hit
  • is_corner_cell
  • is_center_cell
  • is_legal
  • is_impossible
  • cluster_size
  • remaining_ship_count
  • remaining_ship_max_length

All features must be normalized using the provided StandardScaler.


๐Ÿš€ Usage

1. Load the Model and Scaler

from tensorflow.keras.models import load_model
import joblib
import numpy as np

# Load model and scaler
model = load_model("battleship_mlp.h5")
scaler = joblib.load("battleship_scaler.pkl")

# Load feature order
with open("feature_list.txt") as f:
    feature_order = f.read().splitlines()
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support