Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hunter Gear Optimization Team Alt + F4 Michael Barbour; Joshua Law son; Michael Lee.

Similar presentations


Presentation on theme: "Hunter Gear Optimization Team Alt + F4 Michael Barbour; Joshua Law son; Michael Lee."— Presentation transcript:

1 Hunter Gear Optimization Team Alt + F4 Michael Barbour; Joshua Law son; Michael Lee

2 Formal Statement

3 Informal Statement Our goal with the chosen project involves looking at a Set of items within World of Warcraft and writing algorithms to select subsets of gear that maximize the DPS (Damage Per Second). There are 7 gear slots with 4 or 5 possibilities each. Only 1 item will be selected per slot.

4 Abstract We then treat this problem as a modified 0/1 Knapsack problem. A 0/1 Knapsack problem is where the number of Xi copies is restricted to either 0 or 1. The modification we made makes it so each item is categorized by slot and only one item per slot can be selected. This applies to the in-game system where multiple items can not be used in the same slot.

5 Algorithms Brute Force: Enumeration through every possible gear combination. O(a n ): a = number of items in a slot, n = the number of gear slots. BackTracking: An approach that searches through a list based upon a best case step. O(a n ) Greedy: A naïve approach that chooses the gear set with the highest Vi O(n 2 )

6 Brute Force Algorithm Creates a truth table that has as many entries the number of gear slots that are being tested and that are as deep as the amount of gear in each slot The drop chance as well as the value on each gear set is calculated O(a n ) complexity (4 * 5 * 5 * 5 * 5 * 5 * 5 = 233,280 possible gear sets) Weapon04Chest05Legs05Gloves05Boots05Helmet05Shoulders05

7 Brute Force Algorithm

8 Pros: Explores all options and finds the absolute best outcome Cons: For large data sets, may take an unreasonably long amount of time. If the value calculation takes more than a few milliseconds, runtime may end up taking unreasonably long

9 Backtracking: Eight Queens Puzzle A classic example of a backtracking problem is the Eight Queens Puzzle. In the Eight Queens Puzzle one must place a total of 8 queens on an 8x8 chessboard without one queen threatening another.

10 Backtracking Algorithm Using this example, the backtracking algorithm we implemented went through a piece of gear and determined whether or not it could meet the constraints that we placed, such as total value or drop percentage. If that piece failed, like the Eight Queens Puzzle we tried every piece in that “row”, in this case the given set for that particular piece, until one fit. Then we moved to the next piece until an obstacle was found, or an optimal set of gear was found.

11 Backtracking Algorithm Pros Typically simple to implement Can be a quick algorithm depending on constraints given. Cons Has a possibility of taking a long time depending on the constraints given

12 Greedy Algorithm The greedy algorithm applied to the problem works in two ways. It looks for either the items with the highest value within the constraint limit or it looks for the items with the largest weight within the constraint limit. It is a naïve approach that tackles the problem by sorting the set based upon either the weight or value. It then “picks up” the gear in order while checking to make sure that multiple pieces of the same type are not taken or the constraint limit is not crossed.

13 Greedy Algorithm Pros Easy to design and implement. Can run quickly because of simplicity. Cons Possible to find answers that are nowhere near optimal.

14 Greedy Algorithm Greed is not always good

15 Results Brute Force Any Percent Best value 37726, Mean 26984, Standard Deviation 5144 Above 80 Percent Best value 33745, Mean 23912, Standard Deviation 4770 Above 85 Percent Best value 29749, Mean 20097, Standard Deviation 4605 Backtracking Any Percent Best value 37726 Above 80 Percent Best value 33745 Above 85 Percent Best value 29749 Greedy Any Percent Best value 37726 Above 80 Percent Best value 28374 Above 85 Percent Best value 24718

16 Results Runtime Comparison (average over 1000 runs) Brute Force: 4.45 seconds BackTracking:.0000344 seconds (34.4 microseconds) Greedy:.0000526 seconds (52.6 microseconds)

17 Conclusion The Brute Force algorithm searches all values in a set order. It is the most accurate algorithm and examines all possible results, but does so at the cost of having the longest runtime The backtracking algorithm searches depth first through the items. It potentially has an exhaustive run-time but can possibly find an optimal set in much less time than exhaustive. The greedy algorithm chooses items based on optimizing value, weight, or a ratio of both. While it is capable of finding an optimal result with a low run-time, it can run into issues where the algorithm finds sub-optimal results.

18 Expansion How could we expand? Different Classes/Specs Increase Number of Items Polish and Ease of Use Add in Ability to Modify Starting Set Reapplying the algorithms Traveling Salesman Problem, Freight Shipping

19 Questions Given a set of 7 gear slots, each with 6 different possible item choices for each slot, how many different item sets can be made? 6 7 or 279,936 item sets When should you use a greedy algorithm? To get a rough idea of what the optimal set is with a short run-time What is a knapsack problem? Finding a subset of items that maximizes value while staying within a constraint limit. What are some real life examples of Knapsack Problems? Freight Shipping, Theft, Packing for a Hike. What are the drawbacks to a brute force algorithm? It may take a prohibitively long amount of time for more complex problems.


Download ppt "Hunter Gear Optimization Team Alt + F4 Michael Barbour; Joshua Law son; Michael Lee."

Similar presentations


Ads by Google