[PYTHON] When I made a recommended game search with YoutubeDataAPIv3 and fastText, I found a game that seemed to be interesting that I had never known before.

We will talk about collecting live videos on Youtube, creating distributed expressions with fastText, and creating a service that allows you to search for recommended games according to your taste.

A service that allows you to find games that you like "Game Concierge.AI"

Why i decided to make

It was difficult to find the game I wanted to play next with a normal online search.

In the first place, it is difficult to actively find unknown content by searching the net. It is quite difficult for people who do not know the word "Splatoon 2" to find "Splatoon 2".

Well, it is possible to find a work you do not know by searching for "new work ranking". However, in that case, you need to find the game you want to play from among many unknown works. Examine the outline of each work, compare each one, and select the one that seems to be the most interesting. Just thinking about it is quite troublesome. * When I actually did it, it was too troublesome and my heart broke normally.

I wanted to find a way to find the game I want to play next more easily and quickly, so I made it by personal development.

What kind of thought did you make

First of all, I don't think about people who have already decided which game they want to play next. I haven't decided which game I want to play next, but I will consider people who want to play something as the main target.

A simple sales ranking or a new list is not good. If the number of cases listed is large, it is troublesome to check many games one by one, so it is NG. If the number is small, you may not have a game you like, so it's no good.

Then, I came up with the idea of "finding a recommended game based on the game I like, in the Imozuru style."

Specifically, it is like this.

――Imagine one game you like ――Identify the person who likes the game --List the games that the person likes ――Because people who like the same game as you like it, you will love it too!

In short, the idea is similar to "Other people are also looking at this product" that is often found on EC sites. If you are recommended that "people who like this game also like this game", you will want to try it.

I made it right away

First, I searched for recommended games in my favorite game "Fire Emblem Fuka Yuzuki".

image.png

Considering that "Fire Emblem Fuka Yuzuki" is characterized by its character game elements, strategic elements, and nurturing elements, all the recommended games are reasonably convincing. At the same time, it feels good that the recommended games are separated from each other. These 6 works have a range of about 3 years from 2017 to 2020 in terms of release date. As for the appearance of the package image, it is also interesting that the refreshing image "Tales of Vesperia REMASTER" and the slightly dark "Kowloon Youma Gakuenki ORIGIN OF ADVENTURE" are lined up. I think there is no other site that gives such a result by searching from "Fire Emblem Fukayukitsuki".

Also, not only the search results but also the search experience is important.

I didn't know any of the games in the search results originally, but when I looked up the outline of each game to write this article, they all seemed interesting and I wanted to try them. It was just. What's more, all I did to get this search result was to think of the game I liked. With that alone, I was a little impressed by the number of games that I wanted to play next. It may be pointed out that I myself am too ignorant of the recent game situation, but I think it is amazing that search works without prior knowledge.

Even more interesting is the "search for games that people who like this game might like". This is a function to search again using the games that appear in the search results, but it is really fun to see various games appearing in the Imozuru style.

It takes almost no time to find the game you want to play next because you can keep track of the connections that focus on the commonality that you like the same game, and you will find too many games that interest you.

Each game always has a link to Amazon and Youtube, so you can check the word-of-mouth rating and check the play video smoothly. I think it helps you decide which game seems to be the most interesting.

Once summarized

This is Miso, but I think we have created a fairly nice Web service. If there is data, it seems that various applications can be considered, such as searching movies and novels in a worm-like manner.

I hear that the demand for games is increasing due to the consumption of corona stagnation. If you've been playing something for the first time in a while and don't know which game to choose, I'd appreciate it if you could give it a try.

I hope Game Concierge.AI will help you to find the next game. If you have any concerns, please comment on anything, including your impressions and criticisms.

We have released the service, but we are still collecting and analyzing data in parallel. If there are games that are not available on the site, please contact us and we will give priority to them, and if the site has a good reputation, we would like to update it so that we can cover smartphone games, so please do not hesitate to contact us. Try using Concierge.AI](https://games.youmight.love/).


Finally, I will write a little thought about making this service.

Basic algorithm

The general processing flow is as follows.

--Collect video data from YoutubeDataAPIv3 ――Determine what game each video is playing --Collect the play history for each channel and get a distributed representation with fastText

In words, it is a mechanism that "creates a distributed expression from the history information of the games that many people actually played, and people who played one game recommend the other games played."

By adopting such a mechanism, even a person (I) who is not familiar with the situation in the recent game area can search for a game that seems to be interesting from the favorite games that he has played in the past.

Now, in order to create a distributed representation, we need to collect historical information about the games that many people have actually played. But, of course, I don't have that kind of data. So, this time I used YoutubeDataAPIv3 to collect a lot of play history. The games played in the videos in the channel are arranged in chronological order and used as fastText input data to create a distributed representation.

Reference) Data image: 1 line corresponds to 1 channel


Game A Game A Game B ・ ・ ・ Game X
Game a Game b Game c ・ ・ ・ Game y Game z

Please note that some precautions are required when collecting data using YoutubeDataAPIv3. First, the default limit for API usage is 100 requests per day. It is possible to get up to 50 video data with one request, but since there are quite a few channels with less than 50 videos, 5,000 videos cannot be collected per day. Also, the number of videos that can be acquired from one channel is about 500 (it seems to change depending on the timing, but the details are a mystery), and not all videos can be acquired from channels that include more videos. Furthermore, regardless of that, there were some cases where you couldn't get all the videos in the channel (for example, you can only get 5 videos even though there are 10 videos). In my case, I decided that there was no problem even if the play history was not strict for this purpose, so I proceeded as it was.

After collecting a large amount of video data from YoutubeDataAPIv3, you need to determine what game play video each video is. I think there are many ways to do this, but this time I decided to consider it as a play video of the game if the title or description of the video contains the title of the game.

In this way, I created a play history for each channel from a Youtube video and fed it to fastText to create a distributed expression. Game Concierge. Using the title of the game entered from the AI screen as a key, the top 15 games with close distances on the distributed expression are returned.


In this article, I would like to end here. Details on data acquisition, data analysis, application construction, etc. will be summarized in a separate article at a later date.

In particular, we are hosting on free Heroku this time, but since we are very particular about response speed, we plan to dig deeper into site response optimization. Please stay tuned.

Recommended Posts

When I made a recommended game search with YoutubeDataAPIv3 and fastText, I found a game that seemed to be interesting that I had never known before.
A story that I was addicted to when I made SFTP communication with python
When writing to a csv file with python, a story that I made a mistake and did not meet the delivery date
A story that stumbled when I made a chatbot with Transformer
I made a shuffle that can be reset (reverted) with Python
I made a system that automatically decides whether to run tomorrow with Python and adds it to Google Calendar.
I made a life game with Numpy
I made a roguelike game with Python
I made a familiar function that can be used in statistics with Python
I want to make a game with Python
I made a bin picking game with Python
I made a program to convert images into ASCII art with Python and OpenCV
I made a web application that maps IT event information with Vue and Flask
I don't like to be frustrated with the release of Pokemon Go, so I made a script to detect the release and tweet it
I made a tool to automatically generate a state transition diagram that can be used for both web development and application development