- merged some changes from AI Cup Commons.