9th place solution in "Santa 2020 - The Candy Cane Contest"

Overview

Santa 2020 - The Candy Cane Contest

My solution in this Kaggle competition "Santa 2020 - The Candy Cane Contest", 9th place.

Basic Strategy

In this competition, the reward was decided by comparing the threshold and random generated number. It was easy to calculate the probability of getting reward if we knew the thresholds. But the agents can't see the threshold during the game, we had to estimate it.

Like other teams, I also downloaded the history by Kaggle API and created a dataset for supervised learning. We can see the true value of threshold at each round in the response of API. So, I used it as the target variable.

In the middle of the competition, I found out that quantile regression is much better than conventional L2 regression. I think it can adjust the balance between Explore and Exploit by the percentile parameter.

Features

        #         Name Explanation
#1 round number of round in the game (0-1999)
#2 last_opponent_chosen whether the opponent agent chose this machine in the last step or not
#3 second_last_opponent_chosen whether the opponent agent chose this machine in the second last step or not
#4 third_last_opponent_chosen whether the opponent agent chose this machine in the third last step or not
#5 opponent_repeat_twice whether the opponent agent continued to choose this machine in the last two rounds (#2 x #3)
#6 opponent_repeat_three_times whether the opponent agent continued to choose this machine in the last three rounds (#2 x #3 x #4)
#7 num_chosen how many times the opponent and my agent chose this machine
#8 num_chosen_mine how many times my agent chose this machine
#9 num_chosen_opponent how many time the opponent agent chose this machine (#7 - #8)
#10 num_get_reward how many time my agent got rewards from this machine
#11 num_non_reward how many time my agent didn't get rewarded from this machine
#12 rate_mine ratio of my choices against the total number of choices (#8 / #7)
#13 rate_opponent ratio of opponent choices against the total number of choices (#9 / #7)
#14 rate_get_reward ratio of my rewarded choices against the total number of choices (#10 / #7)
#15 empirical_win_rate posterior expectation of threshold value based on my choices and rewords
#16 quantile_10 10% point of posterior distribution of threshold based on my choices and rewords
#17 quantile_20 20% point of posterior distribution of threshold based on my choices and rewords
#18 quantile_30 30% point of posterior distribution of threshold based on my choices and rewords
#19 quantile_40 40% point of posterior distribution of threshold based on my choices and rewords
#20 quantile_50 50% point of posterior distribution of threshold based on my choices and rewords
#21 quantile_60 60% point of posterior distribution of threshold based on my choices and rewords
#22 quantile_70 70% point of posterior distribution of threshold based on my choices and rewords
#23 quantile_80 80% point of posterior distribution of threshold based on my choices and rewords
#24 quantile_90 90% point of posterior distribution of threshold based on my choices and rewords
#25 repeat_head how many times my agent chose this machine before the opponent agent chose this agent for the first time
#26 repeat_tail how many times my agent chose this machine after the opponent agent chose this agent last time
#27 repeat_get_reward_head how many times my agent got reward from this machine before my agent didn't get rewarded or the opponent agent chose this agent for the first time
#28 repeat_get_reward_tail how many times my agent got reward from this machine after my agent didn't get rewarded or the opponent agent chose this agent last time
#29 repeat_non_reward_head how many times my agent didn't get rewarded from this machine before my agent got reward or the opponent agent chose this agent for the first time
#30 repeat_non_reward_tail how many times my agent didn't get rewarded from this machine after my agent got reward or the opponent agent chose this agent last time
#31 opponent_repeat_head how many times the opponent agent chose this machine before my agent chose this machine for the first time
#32 opponent_repeat_tail how many times the opponent agent chose this machine after my agent chose this machine last time

Software

  • Python 3.7.8
  • numpy==1.18.5
  • pandas==1.0.5
  • matplotlib==3.2.2
  • lightgbm==3.1.1
  • catboost==0.24.4
  • xgboost==1.2.1
  • tqdm==4.47.0

Usage

  1. download data from Kaggle by /src/01_downlaod/download.py

  2. create a dataset by /src/02_[regressor]/preprocess.py

  3. train a model by /src/02_[regressor]/train.py

Top Agents

Regressor Loss NumRound LearningRate LB Score SubmissionID
LightBGM Quantile (0.65) 4000 0.05 1449.4 19318812
LightBGM Quantile (0.65) 4000 0.10 1442.1 19182047
LightBGM Quantile (0.65) 3000 0.03 1438.8 19042049
LightBGM Quantile (0.66) 3500 0.04 1433.9 19137024
CatBoost Quantile (0.65) 4000 0.05 1417.6 19153745
CatBoost Quantile (0.67) 3000 0.10 1344.5 19170829
LightGBM MSE 4000 0.03 1313.3 19093039
XGBoost Pairwised 1500 0.10 1173.5 19269952
You might also like...
 Waymo motion prediction challenge 2021: 3rd place solution
Waymo motion prediction challenge 2021: 3rd place solution

Waymo motion prediction challenge 2021: 3rd place solution 📜 Technical report 🗨️ Presentation 🎉 Announcement 🛆Motion Prediction Channel Website 🛆

4th place solution to datafactory challenge by Intermarché.

Solution to Datafactory challenge by Intermarché. 4th place solution to datafactory challenge by Intermarché. The objective of the challenge is to pre

BirdCLEF 2021 - Birdcall Identification 4th place solution

BirdCLEF 2021 - Birdcall Identification 4th place solution My solution detail kaggle discussion Inference Notebook (best submission) Environment Use K

My 1st place solution at Kaggle Hotel-ID 2021

1st place solution at Kaggle Hotel-ID My 1st place solution at Kaggle Hotel-ID to Combat Human Trafficking 2021. https://www.kaggle.com/c/hotel-id-202

1st place solution to the Satellite Image Change Detection Challenge hosted by SenseTime
1st place solution to the Satellite Image Change Detection Challenge hosted by SenseTime

1st place solution to the Satellite Image Change Detection Challenge hosted by SenseTime

10th place solution for Google Smartphone Decimeter Challenge at kaggle.
10th place solution for Google Smartphone Decimeter Challenge at kaggle.

Under refactoring 10th place solution for Google Smartphone Decimeter Challenge at kaggle. Google Smartphone Decimeter Challenge Global Navigation Sat

🥈78th place in Riiid Solution🥈

Riiid Answer Correctness Prediction Introduction This repository is the code that placed 78th in Riiid Answer Correctness Prediction competition. Requ

4th place solution for the SIGIR 2021 challenge.

SIGIR-2021 (Tinkoff.AI) How to start Download train and test data: https://sigir-ecom.github.io/data-task.html Place it under sigir-2021/data/. Run py

 Meli Data Challenge 2021 - First Place Solution
Meli Data Challenge 2021 - First Place Solution

My solution for the Meli Data Challenge 2021

Owner
toshi_k
toshi_k
Kaggle | 9th place (part of) solution for the Bristol-Myers Squibb – Molecular Translation challenge

Part of the 9th place solution for the Bristol-Myers Squibb – Molecular Translation challenge translating images containing chemical structures into I

Erdene-Ochir Tuguldur 22 Nov 30, 2022
Kaggle | 9th place single model solution for TGS Salt Identification Challenge

UNet for segmenting salt deposits from seismic images with PyTorch. General We, tugstugi and xuyuan, have participated in the Kaggle competition TGS S

Erdene-Ochir Tuguldur 276 Dec 20, 2022
Xview3 solution - XView3 challenge, 2nd place solution

Xview3, 2nd place solution https://iuu.xview.us/ test split aggregate score publ

Selim Seferbekov 24 Nov 23, 2022
Kaggle Lyft Motion Prediction for Autonomous Vehicles 4th place solution

Lyft Motion Prediction for Autonomous Vehicles Code for the 4th place solution of Lyft Motion Prediction for Autonomous Vehicles on Kaggle. Discussion

null 44 Jun 27, 2022
The 3rd place solution for competition

The 3rd place solution for competition "Lyft Motion Prediction for Autonomous Vehicles" at Kaggle Team behind this solution: Artsiom Sanakoyeu [Homepa

Artsiom 104 Nov 22, 2022
1st Place Solution to ECCV-TAO-2020: Detect and Represent Any Object for Tracking

Instead, two models for appearance modeling are included, together with the open-source BAGS model and the full set of code for inference. With this code, you can achieve around mAP@23 with TAO test set (based on our estimation).

null 79 Oct 8, 2022
Code for 1st place solution in Sleep AI Challenge SNU Hospital

Sleep AI Challenge SNU Hospital 2021 Code for 1st place solution for Sleep AI Challenge (Note that the code is not fully organized) Refer to the notio

Saewon Yang 13 Jan 3, 2022
RANZCR-CLiP 7th Place Solution

RANZCR-CLiP 7th Place Solution This repository is WIP. (18 Mar 2021) Installation git clone https://github.com/analokmaus/kaggle-ranzcr-clip-public.gi

Hiroshechka Y 21 Oct 22, 2022
The 1st place solution of track2 (Vehicle Re-Identification) in the NVIDIA AI City Challenge at CVPR 2021 Workshop.

AICITY2021_Track2_DMT The 1st place solution of track2 (Vehicle Re-Identification) in the NVIDIA AI City Challenge at CVPR 2021 Workshop. Introduction

Hao Luo 91 Dec 21, 2022
7th place solution of Human Protein Atlas - Single Cell Classification on Kaggle

kaggle-hpa-2021-7th-place-solution Code for 7th place solution of Human Protein Atlas - Single Cell Classification on Kaggle. A description of the met

null 8 Jul 9, 2021