MSP Event

SG
Last updated yesterday

Welcome to the Microsoft Student Partner Event Introduction

Welcome

Our short welcome video will introduce you to the event and how to get started

First Steps

As described in the video above, your next steps are:

  1. Create an account to use the platform at aigaming.com

  2. Get an API Key for the Microsoft Computer Vision Cognitive API

    1. Follow the instructions here to get a free Microsoft trial

  3. In the AI Gaming Editor, load the MS API Template

    1. Go to the AI Gaming Editor

    2. Select Match Game as the Game Type

    3. Create a new file using the MS API Template

    4. Paste your Microsoft API key into your new file where it says: "YOUR-MICROSOFT-COMPUTER-VISION-API-KEY-HERE"

More Information

There are more videos to show you how to compete in the event and how to modify the MS API Template code.

Introduction to the editor and how to run 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 Enter 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.

How to Implement Landmark Matching

We give you template code that can already analyse images and identify which animal is in them using the Computer Vision API. The first step to playing the Match Game better is to update the code to identify and match landmarks in images.

The template code has comments to guide you in achieving this, but this video provides step by step instructions. If you follow the steps in the video, your code should be able to recognise both animals and landmarks and play a vastly improved game.

How to Use the OCR (Optical Character Recognition) API

There are three types of image included in the tiles used in the Match Game - animals, landmarks and words. Once your code is successfully recognising animals and landmarks, you can use the additional Cognitive Services Computer Vision API, OCR (optical character recognition) to read the word on tiles which do not appear to have an animal or landmark present. This video explains how to implement OCR in your code and begin to recognise and match word type tiles. This will also give you the skills you need to implement the advanced strategy of reading the types of tiles from their backs and making your guesses more accurate as a result.

How to View the Cognitive API Response

The Microsoft Cognitive Services Computer Vision Analyze API returns extensive information on the image that was analysed. This video shows how this information can be displayed within the Online Code Editor (OCE) and therefore the relevant components required to play the game can be extracted. Column three of the OCE is used to display the result returned and we explain how this can be interpreted into Python code in your solution to access the relevant parts of the data.

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 code

These are the best steps to take in order to improve your code:

  1. Implement Landmark matching.

  2. Implement text recognition and word matching

  3. Read the tile backs to match tiles from the same category

  4. Check if you can match tiles in the bonus category

  5. Wait before matching any tiles to match tiles in consecutive Bonus Categories.