Skip to content

The winning solution to the RAFAEL Machine Learning Challenge 2019 competition

Notifications You must be signed in to change notification settings

EliorBenYosef/rafael-ml-challenge-2019-winning-solution

Repository files navigation

RAFAEL Machine Learning Challenge 2019 winning solution

This algorithm won the RAFAEL Machine Learning Challenge 2019 competition.

The algorithm uses a total of 7 neural networks to choose and intercept the highest-profile rocket, at any given moment.

Table of contents:

The Competition

RAFAEL Advanced Defense Systems Ltd. is a well-known Israeli defense tech company (wiki).

RAFAEL constructed a game in which you play a defending turret, which intercepts enemy rockets fired at two cities.

The RAFAEL Machine Learning Challenge 2019 competition was to write an ML-based python software that plays the game independently, and gets the highest score.

The Solution

Approach: breaking down the challenge into small tasks involving a single rocket \ single rocket-interceptor pair.

Phase 1 - Neural Networks Training

Neural Networks:

  • (1) Fire-angle assessment network - for a single rocket.
  • (2) Collision assessment networks - for a single rocket.
    • binary classification (ground \ city)
    • time-steps to collision
  • (4) Interception assessment networks - for a single rocket (pre-fire interception assessment) or for a single rocket-interceptor pair (interception assessment).
    • binary classification (miss \ hit)
    • time-steps to interception (only in case of a successful interception)

Phase 2 - Solution Algorithm

A decision-making algorithm, which chooses the highest-profile rocket, according to the following criteria:

  • Interceptability.
  • Threat level - hitting city\ground, time-steps to collision.
  • Relevancy - whether the missile is already on its way to be intercepted (when an interceptor was already fired).
  • Opportunity level - proximity to fire angle, ability to fire (when not in cooldown mode).

One of the main challenges here was achieving a correct interpretation of the rockets & interceptors lists in the observation vector (and specifically identifying appearance & disappearance of rockets & interceptors).

Hyperparameter Tuning

Denominator testing (with initial angle 6°, np seed: 28)
  • config 0 - denominator *= (t_to_fire_angle + 1). Handles the t_to_fire_angle == 0 problem.
  • config 1 - denominator *= (t_to_fire_angle + 1) if t_to_fire_angle > fire_action_range else 1. Further penalizes high t_to_fire_angle missiles.
  • config 2 - denominator *= (t_to_fire_angle + 1) if t_to_fire_angle >= fire_action_range + fire_threshold else 1. Further penalizes only extremely high t_to_fire_angle missiles.

The optimal denominator was config 1 -

Initial angle optimization (with Denominator config 1)

The initial angle is the desired barrel angle, when there are no enemy rockets in the air.

The optimal initial angle was 60° -

. 48° 54° 60° 66° 72° 78° 84°
avg 9.876 5.926 16.173 32.483 24.423 17.506 22.546 19.613
median 12.0 26.5 15.5 69.0 51.0 39.0 28.5 40.0

Algorithm Performance

Dependencies

  • Python 3.6.5
  • Tensorflow 1.10.0
  • Keras 2.2.2
  • Numpy
  • Matplotlib