AI Gaming

Custom Vision Event Intro

Train your own Custom Vision Image Classifier and call it from Python code.

Microsoft Custom Vision Event Introduction

Our short welcome video will introduce you to the event and how to get started
In order to play our Custom Vision Rummy game, you need to train your own image classification AI to be able to identify planets in images. We'll use Microsoft's Custom Vision service to help us create and train an AI image classification model. When you have done this, you can use your newly created model to play our Rummy Vision game and compete in the tournaments for our event.

What to do next

To proceed, work your way through the instructions on this page. Start off by:
  1. 1.
    Signing up for an account on the site.
  2. 2.
    Creating a Microsoft Azure account if you don't already have one.
    1. 1.
      Your event host will help you create an account, or you can follow our instructions at Create a Student Free Trial Microsoft Azure Account.
Then, continue working through this page, watching the videos below for the next steps and for detailed instructions of how to
  • train your own Custom Vision Model
  • access that model from Python code
  • use it to play our Rummy Vision Planets game

How to train a Custom Vision model

Microsoft's Computer Vision service is a collection of pre-trained AI models that recognise objects in images like animal, landmarks, celebrities and words. Our game needs you to be able to identify the different planets which Microsoft's Computer Vision does not do, but, you can create and train your own Microsoft Custom Vision model to do this. The next video shows you how to create and train your own Custom Vision model to recognise planets.
You can download the initial set of training and test images that are referred to in the video above from:
Or you can see it in our GitHub repo at:

How to access your Custom Vision model in Python Code

This video shows you how to call your new Custom Vision model from Python in order to analyse images of planets. It tells you where to find our template code that will show you how to add your Custom Vision model to your code and it lets you analyse your own planet images to see how well your Custom Vision model performs.
Now that you can call your Custom Vision model from a code file you can experiment with other planet images and with how you use the Custom Vision model.

How to use your Custom Vision model to play the Rummy Vision game

Now that you have seen how to call your Custom Vision model to analyse images, we can use the model to play the Rummy Vision game. We've got some more template code to get you started. Watch the video below to find out how to use it with your Custom Vision prediction url and prediction key.
You've now seen all of the basics to be able to play our Rummy Vision game with planet images. We recommend you concentrate on improving you Computer Vision model by training it with more images.
If you want to find out more about how to improve the template code that plays the Rummy Vision game, make sure to watch the next video Introduction to coding your game playing bot

More details about modifying the Rummy Vision Template code?

If you haven't taken part in an AI Gaming event before or you want to review more details about how to modify the Rummy Vision template code, you can review our other Rummy Vision introduction videos from our Computer Vision page at

What are tournaments and how to enter your code into a tournament

Entering your code into a tournament lets you find out how good your game playing bot is. Each event will have at least one tournament and the video below gives you a quick overview of how to make sure your code is registered to play.

Introduction to the editor and running games

The Online Code Editor is where you spend most of your time as you write the code for your automated game playing bot. It's also where you run the code to play the games. Find out all about the Online Code Editor and how to play games in this video

How to Navigate JSON Objects Using Python Dictionaries

JSON objects are widely used to transfer data to and from API services. They are human readable text strings which adhere to a formal syntax which means they are also readable in software. JSON objects can be easily manipulated in Python code by converting them to or from dictionary objects. This video introduces the format of JSON objects, demonstrates how to convert them to and from Python dictionary objects, and gives examples of how to work with dictionaries in your code.

Best steps to improve your performance

We recommend tackling the following steps in order as the best approach to improving your code:
  1. 1.
    Increase the number of images for each planet to improve the accuracy of your model. Use at least 20 images. More if you can.
  2. 2.
    Test your model in the site dashboard to gauge which planets it struggles to recognise and concentrate on improving those planets.
  3. 3.
    If your model is successfully recognising planets, you can look at adding some game playing strategy to the code that plays the Rummy Vision game on the AI Gaming site.
    1. 1.
      You can read more about improving the Rummy Vision code on our Microsoft Rummy Vision Help Page

More information

For more detailed information about developing your solution for the Rummy Vision Game, go to the Microsoft Rummy Vision.
For our written Really Quick Start summary of how to starting coding solutions on the site go to our Really Quick Start page here.