• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
sooner123

Suggestion algorithm

8 posts in this topic

I'm currently in the process of designing a web service that will allow users to give binary information about whether they enjoyed a game/movie/show/anime/music/book/etc. Then the service will turn around and offer suggestions of other media that the user would have a good probability of enjoying.

 

Netflix/Amazon/IMDB/a lot of other services provide this feature.

 

The algorithm I'm looking at using for suggesting new media for the user based on what they "liked" is the somewhat well known cosine algorithm. This algorithm basically makes the assumption that there is a reasonably strong correlation between the cosine of the angle between two vectors and their "similarity."

 

Basically imagine a grid where one axis is all users and the other axis is all media. Each intersection is a 1 if that media was liked by that user and a 0 if not.

 

Now if a user likes media item 'X,' then the vector for X is taken against the vector for every other media item. For each pair, the dot product is taken, then divided by the product of their magnitudes. This results in the cosine of the angle between the two vectors.

 

These are then ranked and the top candidates are suggested to the user in order.

 

My question/problem:

 

This will become prohibitively expensive quickly.

 

First off, the cosine(angle) needs to be computed for every pair of vectors every so often.

 

Then for every user, the suggestions based on their "likes" need to be sorted and presented every so often. Basically for this we need to look through the database of cosine(angle)'s and grab all the scores that include as one of their items, one that the user has liked. Then sort that list and present the top few to the user.

 

For millions of users and thousands of items, this could grow way out of control.

 

Are their cheaper ways of doing this? Or am I going about it algorithmically wrong. Or is it just something that has to be dealt with directly via cacheing/segmenting/etc.?

0

Share this post


Link to post
Share on other sites

You can define the error rate of your model to be the average amount of information per rating given the model (a.k.a. cross entropy). If the model estimates that the rating will be X with probability p, the amount of information associated with the rating being X is -log2(p). Now you can compute the derivative of this number with respect to each of the numbers involved in the computation of p, and use some form of gradient descent to adjust those numbers. Iterate through the data a few times until the numbers converge.

 

You should keep some of your data for testing the quality of your predictions. You can use cross entropy as the measure of performance.

 

Machine learning is a difficult subject, but I think this might be a good project to get into it, because the learning is pretty straight forward.

2

Share this post


Link to post
Share on other sites

Are you familiar with Bayesean Inference at all? That's one approach to this kind of problem.

 

Unless I misunderstand your approach, I think how you meant to model your approach is not as a grid -- vectors in the grid become relative, unless I'm missing something, and hence, not much use. Instead, if each user is a vector of all media, you can then compare the preferences of a given user, and then make suggestions based upon the likes of similar users; in principle:

 

  • For the target user, form a vector composed of all media they've rated, and identical vectors for all other users, or a sufficiently-large sample of other users.
  • Compare this vector to the vector of each other user for similarity (dot product), choose a set of users that are most closely matched. If you like, you can weight the users according to whether the similarity is strong or weak.
  • From the set of similar users, suggest to the target user media that similar users have liked, but which the target user has not consumed/rated themselves. Rank recommendations by the consistency with which the similar users preferred each media.

 

You can do this based on simple thumbs-up/thumbs-down of individual media, or by a fuzzy rating. There are pros and cons to both approaches. You can also decompose media into representative traits (animation or live-action, genre, themes, writers, directors, actors, etc) and then form your vectors based on the traits, rather than the media itself (then, to recommend, you do the reverse, looking for media which has similar traits -- in fact, to some extent you can rely less on the comparison to similar users).

Edited by Ravyne
0

Share this post


Link to post
Share on other sites

I do not think it will work.  You are looking into data relationships not the actual trig function.  It isn't a math algorithm it is an object algorithm.

-3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0