• 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
Tutorial Doctor

Need help with a fuzzy Scoring algorithm.

6 posts in this topic

(I am on a tablet, I will format this when I am on my computer.)

First, I am wondering if my math is correct. Also, I need help interpreting the negative, large number in this example. I know that negative numbers mean that the value is not a member of the set. But what does the constant represent? What is its range? Here are my notes:

 

This algorithm gives a fuzzy score of a player based on his/her score on certain criteria, between an ideal maximum and minimum range of performance. 

 

Scoring Algorithm: Quantifying the words, “Good Job!”

The steps (briefly):

 

1) Determine overall maximum score.
2) Divide scoring criteria into groups.
3) Determine the total weight of each group as a percent of the maximum.
4) Determine the individual weight of the elements in the group (the sum of the individual elements must equal the total weight of the group) as a percent of the total weight of the group.
5) Determine the ideal max, and minimum scores for each individual element in the group.
6) Get the performance of the player.
7) Find the fuzzy degree of the players performance as a function of the maximum and minimum scores.

Fuzzy Formula:
degree = (value-minimum)/(maximum - minimum) * 100

Example:

Max score: 100

Speed: 33%

* long distance: 50%
* max(average) = 30mph
* min(average) = 20mph
* value(average) = 25mph
* long_degree = 50% good & 50% bad(where best is 30mph and worst is 20mph)

* short distance: 50%
* max(average) = 30mph
* min(average) = 20mph
* value(average) = 25mph
* short_degree = 50% good & 50% bad(where best is 30mph and worst is 20mph)

If a player is 50% good at long distance speed, then they are 50% bad at long distance speed. So, out of a possible 100% at long distance speed, they are only 50%. However, this only constitutes for 50% of the total speed score.

How do I get the total speed score?

Out of a total 16.5 points in long distance speed , the player scored 50 % of that (8.25).
Out of a total 16.5 points in short distance speed, the player scored 50% of that (8.25).

The total possible score for the group is 33 points.

The total in speed performance is 16.5 points.

The full formula:
group_element_score = (max_score * group_weight * individual_weight * degree)

long distance speed score = (100 * .3. * .5 * .5) = 8.25
short distance speed score = (100 * .3. * .5 * .5) = 8.25

Strength 33%

* vertical: 50%
* max(average) = 5ft
* min(average) = 2ft
* value(average) = 3ft
vertical_degree = 33% good & 67% bad

* horizontal: 50%
* max(average) = 8ft
* min(average) = 5ft
* value(average) = 7ft
horizontal_degree = 66% good & 33% bad

vertical strength score = (100 * .3. * .5 * .33) = 5.445
horizontal strength score = (100 * .3. * .5 * .66) = 10.89

Stamina 33%

* long term: 50%
* max(average) = 6hrs
* min(average) = 4hrs
* value(average) = 4.5hrs
long_term_degree = 25% good & 75% bad

* short term: 50%
* max(average) = 1hrs
* min(average) = .5hrs
* value(average) = .95hrs
* short_term_degree = 90% good & 10% bad

long term stamina score = (100 * .3. * .5 * .25) = 4.125
short term stamina score = (100 * .3. * .5 * .90) = 14.85

total score = 51.81/100

This means that the overall performance of the player as compared to the ideal player skills (the max and minimum values are the ideal ranges of skill) is 51.81.

If “good”" were in the range:

min = 90
max = 100

then the value 51.81 would certainly not be good.

degree = (value-minimum)/(maximum - minimum) * 100

performance degree = (51.81–90)/(100–90) = –381.9%

Notice that the value is negative. All negative degree values indicate that the score is not in the set of “good.” If the performance score were 90, notice the performance degree would be 0.

Edited by Tutorial Doctor
0

Share this post


Link to post
Share on other sites
Yes Lorenzo. The actual range should be 0 to 1, I just multiplied by 100 for simplicity.

Only thing is, I want to keep the sets fuzzy, not crisp. This way the idea of "good" can be open for interpretation.

All of the players remain good, but to varying degrees. So, one player might be 67.56% good while another player might be 23% good (87% bad). So one player, according to one interpretation of good might be good to a degree of .6756, while according to another interpretation, might be good to a degree of .75.

Then I can do a union or intersection to get the overall opinion of the player's skill level.

I use the same formula you use in your second example, but if I have a crisp boundary at a halfway mark, then a player 1% over that mark will be classified just like a player 2% over that mark.
0

Share this post


Link to post
Share on other sites

If you want fuzzy sets, you can choose some representative ranks and "blend" between them, respecting the rules for fuzzy membership functions (correct range and adding up to 1).

 

For example, assuming normalized score s increase from 0 for the worst player to 1 for the best player, 0 is necessarily fully "bad", and 1 is fully "very good"; you can decide arbitrarily that 0.2 is "mediocre" and 0.7 is "good". Then, if 0.2<=s<=0.7 the player is (0.7-s)/(0.7-0.2) "mediocre", (s-0.2)/(0.7-0.2) "good", and not "bad" or "very good" at all.

Of course, these triangle shaped functions can be replaced by other shapes, possibly with more than two sets for each score.

 

I'm still unsure about the purpose of fuzzy sets and "opinions". Comparing performance between players is a valid indicator of what the player is good at without further elaboration; it would be enough, for example, to suggest training exercises or inform "adaptive difficulty" AI. 

Edited by LorenzoGatti
1

Share this post


Link to post
Share on other sites
Great idea Lorenzo. And yes, I would like to use this to make suggestions for training exercises, or even for what type of tools are "most suitable." Basically it can be for recommendations, but It can also be used for what you said, "adaptive AI."

My long term goal is adaptive AI, where decisions are not made by probability, but by using fuzzy data.

For example, if a wall is "close" then the recommended action is to move away from it. But, if a wall is "close and approaching quickly", then the recomemded action is to run away from it quickly.

It adds so much more realism to AI.
0

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