|
1 |
| -# Introduction |
| 1 | +# Lab 1: Understand and Sign Up for League of Legends |
2 | 2 |
|
3 | 3 | Estimated Time: 5-10 minutes
|
4 | 4 |
|
5 | 5 | ## Overview
|
| 6 | +League of Legends is a team-based strategy game in which two teams of five powerful champions face off to destroy the other’s base. As a player, you can choose from over 140 champions to make epic plays, secure kills, and take down towers as you battle your way to victory. To win, you'll need to destroy the enemy’s Nexus—the heart of each team's base. |
6 | 7 |
|
7 |
| -One day, I woke up and said: how hard could it be to integrate Machine Learning into Gaming, an industry where everything is already software? I started researching the most popular games and, with some gaming experience I had growing up, I decided to look deeper into League of Legends. |
8 |
| - |
9 |
| -Long story short, after some months of developing my League of Legends API wrapper (making calls to the official API with functions I created myself), I started extracting data from professional players with the hopes of creating a Machine Learning predictor that would tell me how I was performing in a match **during and after** the match itself. |
| 8 | +Access and mobility play an important role in LoL. Your team needs to clear at least one lane to access the enemy Nexus. Blocking your path are defense structures called turrets and inhibitors. Each lane has three turrets and one inhibitor, and each Nexus is guarded by two turrets. In between the lanes is the jungle, where neutral monsters and jungle plants reside. The two most important monsters are Baron Nashor and the Drakes. Killing these units grants unique buffs for your team and can also turn the tide of the game. |
10 | 9 |
|
11 |
| -This is what this workshop is going to teach you. |
| 10 | +Team composition depends on five positions. Each lane lends itself to certain kinds of champions and roles—try them all or lock in to the lane that calls you. Champions get stronger by earning experience to level up and buy more powerful items as the game progresses. Staying on top of these two factors is crucial to overpowering the enemy team and destroying their base. |
12 | 11 |
|
13 |
| -We're going to create two models: |
14 |
| -- _Offline Model_: we'll obtain after-match data, and compare how well we did to pàst professional games. This will be a good model to **theorize** about which characters are good/bad in the long run. |
15 |
| -- _Live Client Model_: we'll obtain **real-time** data from a match, run it through our model, and return a winning probability (0-100)%. |
| 12 | +In this lab, we'll leverage the power of AI with League of Legends in a unique and innovative way. We'll dive deep into extractable data (accessible through the game's API), how to structure this data, and how to use it to train our own Machine Learning model to generate real-time predictions about any match. |
16 | 13 |
|
17 |
| -## Introduction to League of Legends |
| 14 | + |
| 15 | +> **Note**: this image represents the functionality in 2022. You only got a winning chance probability. |
18 | 16 |
|
19 |
| -League of Legends is a team-based strategy game in which two teams of five powerful champions face off to destroy the other’s base. As a player, you can choose from over 140 champions to make epic plays, secure kills, and take down towers as you battle your way to victory. To win, you'll need to destroy the enemy’s Nexus—the heart of each team's base. |
| 17 | + |
| 18 | +> **Note**: this image represents the **new** functionality (2023). You get detailed insights about specific parts of your performance, such as your death ratio, your kill+assist ratio and your xp per minute. This allows you to get more information about what you could be doing right or wrong. Notice that in this screenshot, after getting a kill, my winning probabilities increase notably, and my kill + assist ratio, which was terrible until that moment, becomes "not so good". Last year's model had a lot of difficulties in detecting changes like these. |
20 | 19 |
|
21 |
| -Access and mobility play an important role in LoL. Your team needs to clear at least one lane to access the enemy Nexus. Blocking your path are defense structures called turrets and inhibitors. Each lane has three turrets and one inhibitor, and each Nexus is guarded by two turrets. In between the lanes is the jungle, where neutral monsters and jungle plants reside. The two most important monsters are Baron Nashor and the Drakes. Killing these units grants unique buffs for your team and can also turn the tide of the game. |
22 | 20 |
|
23 |
| -Team composition depends on five positions. Each lane lends itself to certain kinds of champions and roles—try them all or lock into the lane that calls you. Champions get stronger by earning experience to level up and buy more powerful items as the game progresses. Staying on top of these two factors is crucial to overpowering the enemy team and destroying their base. |
| 21 | +By the end of this workshop series, you will be able to use our already-trained ML model to make real-time predictions about our in-game performances. You will also get the chance to train your own model (with your own tuning hyperparameters) and use it while you play League. |
24 | 22 |
|
25 |
| - |
| 23 | +We'll also need to create an autonomous database, which will serve as storage for our generated datasets and access points as a whole. |
26 | 24 |
|
27 |
| -This image represents the final functionality of one of the two models we'll explore in this workshop, where we use our already-trained ML model to make __real-time__ predictions about our in-game performances. |
| 25 | +In this Hands-On Lab (HOL), we'll start with the assumption that users know about how League of Legends' matchmaking system works. If you have time and don't know a lot about League of Legends, we recommend reading these lists of articles (included in the repository as well) to get a feel for what we've done in the past, and what we'll partially cover in this Hands-on Lab: |
28 | 26 |
|
29 |
| -Here's a short 3-minute introductory video to League of Legends: |
| 27 | +1. [Article 1](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/livelabs/articles/article1.md): League of Legends Optimizer using Oracle Cloud Infrastructure: Data Extraction & Processing |
| 28 | +2. [Article 2](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/livelabs/articles/article2.md): League of Legends Optimizer using Oracle Cloud Infrastructure: Data Extraction & Processing II |
| 29 | +3. [Article 3](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/livelabs/articles/article3.md): League of Legends Optimizer using Oracle Cloud Infrastructure: Building an Adversarial League of Legends AI Model |
| 30 | +4. [Article 4](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/livelabs/articles/article4.md): League of Legends Optimizer using Oracle Cloud Infrastructure: Real-Time predictions |
| 31 | +5. [Article 5](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/livelabs/articles/article5.md): League of Legends Optimizer using Oracle Cloud Infrastructure: Real-Time predictions II |
30 | 32 |
|
31 |
| -[Watch the video](youtube:OfYU4gbk13w) |
32 | 33 |
|
33 | 34 | ### Prerequisites
|
34 | 35 |
|
35 | 36 | * An [Oracle Free Tier, Paid or LiveLabs Cloud Account](https://signup.cloud.oracle.com/?language=en&sourceType=:ow:de:ce::::RC_WWMK220210P00063:LoL_handsonLab_introduction&intcmp=:ow:de:ce::::RC_WWMK220210P00063:LoL_handsonLab_introduction)
|
36 | 37 | * Active Oracle Cloud Account with available credits to use for Data Science service.
|
| 38 | +* Creating a League of Legends account and completing the in-game tutorial, as we'll need an account to get an API key and perform in-game tests. Also, you'll need to [download the game and register](https://www.leagueoflegends.com/en-gb/). |
37 | 39 |
|
38 |
| -## About Product/Technology |
39 | 40 |
|
40 |
| -OCI Data Science is a fully managed and serverless platform for data science teams to build, train, and manage machine learning models using Oracle Cloud Infrastructure. |
| 41 | +## Task 1: Get Started |
41 | 42 |
|
42 |
| -The Data Science Service: |
| 43 | +This instructional video explains what needs to be done to get an API key necessary to what we will explain in the next lab. |
43 | 44 |
|
44 |
| -- Provides data scientists with a collaborative, project-driven workspace. |
45 |
| -- Enables self-service, serverless access to infrastructure for data science workloads. |
46 |
| -- Helps data scientists concentrate on methodology and domain expertise to deliver models to production. |
| 45 | +[Watch the video](youtube:HUJgYfrHhYI) |
47 | 46 |
|
48 |
| -## Objectives |
| 47 | +1. First, you'll need to obtain a Riot Games API key [from the official Riot Games Developer website.](https://developer.riotgames.com/) For that, you need to create a League of Legends account (if you don't have one already) and request a development API key. Note that if you're planning to develop a League of Legends project out of this repository, you can also apply for a production API key which has a longer expiration date, as well as more requests per minute. |
| 48 | +  |
| 49 | +2. After creating the account, we [access the development website](https://developer.riotgames.com/) to find our development API key. Note that by default, the development API key expires every 24 hours. So, if you're planning to generate a dataset for more than 24 hours at a time, in the end you'll start getting HTTP unauthorized errors. To fix this, just regenerate the API key and use the new one. |
| 50 | +  |
49 | 51 |
|
50 |
| -In this lab, you will complete the following steps: |
| 52 | +If you do run into issues while you're obtaining the API key / you're not able to login to [the developer portal](https://developer.riotgames.com) like in this image: |
51 | 53 |
|
52 |
| -✓ Understand what a Neural Network is and how it works |
| 54 | + |
53 | 55 |
|
54 |
| -✓ Creating an ML model |
| 56 | +Then make sure to sign out of your newly created account, at the top right corner of your screen: |
55 | 57 |
|
56 |
| -✓ Web Sockets / Data Streaming Techniques |
| 58 | + |
57 | 59 |
|
58 |
| -✓ Integrating ML Models with Data Pipelines |
59 |
| - |
60 |
| - |
61 |
| -## OCI Elements |
62 |
| - |
63 |
| -This solution is designed to work with several OCI services, allowing you to quickly be up and running. You can read more about the services used in the lab here: |
64 |
| - |
65 |
| -- [OCI Data Science](https://www.oracle.com/artificial-intelligence/) |
66 |
| -- [OCI Cloud Shell](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cloudshellintro.htm) |
67 |
| -- [OCI Compute](https://www.oracle.com/cloud/compute/) |
68 |
| -- [OCI Autonomous JSON Database](https://www.oracle.com/autonomous-database/autonomous-json-database/) |
| 60 | +And login back again. |
| 61 | +> **Note**: if you still get the error message "waiting for email confirmation" wait a couple of minutes and try again. |
69 | 62 |
|
70 | 63 |
|
71 | 64 | You may now [proceed to the next lab](#next).
|
72 | 65 |
|
73 |
| -## Annex - Additional Resources |
74 |
| -If you have extra time after this workshop and want to get to know more about League of Legends, we recommend reading these lists of articles to get a feel of everything that can be done in the ML + Gaming space: |
75 |
| - |
76 |
| -1. [Article 1](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/livelabs/articles/article1.md): League of Legends Optimizer using Oracle Cloud Infrastructure: Data Extraction & Processing |
77 |
| -2. [Article 2](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/livelabs/articles/article2.md): League of Legends Optimizer using Oracle Cloud Infrastructure: Data Extraction & Processing II |
78 |
| -3. [Article 3](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/livelabs/articles/article3.md): League of Legends Optimizer using Oracle Cloud Infrastructure: Building an Adversarial League of Legends AI Model |
79 |
| -4. [Article 4](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/livelabs/articles/article4.md): League of Legends Optimizer using Oracle Cloud Infrastructure: Real-Time predictions |
80 |
| -5. [Article 5](https://github.com/oracle-devrel/leagueoflegends-optimizer/blob/livelabs/articles/article5.md): League of Legends Optimizer using Oracle Cloud Infrastructure: Real-Time predictions II |
81 |
| - |
82 |
| - |
83 | 66 | ## Acknowledgements
|
84 | 67 |
|
85 | 68 | * **Author** - Nacho Martinez, Data Science Advocate @ DevRel
|
| 69 | +* **Editor** - Erin Dawson, DevRel Communications Manager |
86 | 70 | * **Contributors** - Victor Martin, Product Strategy Director
|
87 |
| -* **Last Updated By/Date** - April 20th, 2023 |
| 71 | +* **Last Updated By/Date** - May 17th, 2023 |
0 commit comments