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

Slides:



Advertisements
Similar presentations
Dynamic Programming 25-Mar-17.
Advertisements

Algorithm Design Techniques
CS Section 600 CS Section 002 Dr. Angela Guercio Spring 2010.
MCS 312: NP Completeness and Approximation algorithms Instructor Neelima Gupta
BackTracking Algorithms
Knapsack Problem: Greedy vs. Brute Force pp (Section 7.6)
Types of Algorithms.
Chapter 5 Fundamental Algorithm Design Techniques.
CS 484 – Artificial Intelligence1 Announcements Department Picnic: today, after class Lab 0 due today Homework 2 due Tuesday, 9/18 Lab 1 due Thursday,
15-May-15 Dynamic Programming. 2 Algorithm types Algorithm types we will consider include: Simple recursive algorithms Backtracking algorithms Divide.
Best-First Search: Agendas
Algorithm Strategies Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 Greedy Algorithms. 2 2 A short list of categories Algorithm types we will consider include: Simple recursive algorithms Backtracking algorithms Divide.
0-1 Knapsack Problem A burglar breaks into a museum and finds “n” items Let v_i denote the value of ith item, and let w_i denote the weight of the ith.
1 Chapter 4 Search Methodologies. 2 Chapter 4 Contents l Brute force search l Depth-first search l Breadth-first search l Properties of search methods.
Chapter 10: Algorithm Design Techniques
Greedy Algorithms CIS 606 Spring Greedy Algorithms Similar to dynamic programming. Used for optimization problems. Idea – When we have a choice.
Ch 13 – Backtracking + Branch-and-Bound
MAE 552 – Heuristic Optimization Lecture 5 February 1, 2002.
Backtracking.
Dave Risch. Project Specifications There is a “knapsack” that you want to fill with the most valuable items that are available to you. Each item has a.
Algorithm design techniques
Brute Force Average of 88 checks Worst possible algorithm if there is a ship in the bottom right cell Best search: 25.
Brought to you by Max (ICQ: TEL: ) March 12, 2005 Recursion and Exhaustion.
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Greedy Methods and Backtracking Dr. Marina Gavrilova Computer Science University of Calgary Canada.
Honors Track: Competitive Programming & Problem Solving Optimization Problems Kevin Verbeek.
Topic 25 Dynamic Programming "Thus, I thought dynamic programming was a good name. It was something not even a Congressman could object to. So I used it.
The Greedy Method. The Greedy Method Technique The greedy method is a general algorithm design paradigm, built on the following elements: configurations:
Optimizing Pheromone Modification for Dynamic Ant Algorithms Ryan Ward TJHSST Computer Systems Lab 2006/2007 Testing To test the relative effectiveness.
Decision Trees Binary output – easily extendible to multiple output classes. Takes a set of attributes for a given situation or object and outputs a yes/no.
Algorithm Design Methods (II) Fall 2003 CSE, POSTECH.
December 14, 2015 Design and Analysis of Computer Algorithm Pradondet Nilagupta Department of Computer Engineering.
Dynamic Programming1. 2 Outline and Reading Matrix Chain-Product (§5.3.1) The General Technique (§5.3.2) 0-1 Knapsack Problem (§5.3.3)
Dynamic Programming.  Decomposes a problem into a series of sub- problems  Builds up correct solutions to larger and larger sub- problems  Examples.
CS 3343: Analysis of Algorithms Lecture 19: Introduction to Greedy Algorithms.
DROPPING LOWEST GRADES MATC Math Club January 26, 2006 Jonathan Kane, Professor University of Wisconsin-Whitewater.
Backtracking & Brute Force Optimization Intro2CS – weeks
Greedy algorithms David Kauchak cs302 Spring 2012.
Spring 2008The Greedy Method1. Spring 2008The Greedy Method2 Outline and Reading The Greedy Method Technique (§5.1) Fractional Knapsack Problem (§5.1.1)
MA/CSSE 473 Day 12 Amortization (growable Array) Knuth interview Brute Force Examples.
Ch3 /Lecture #4 Brute Force and Exhaustive Search 1.
Greedy Algorithms Prof. Kharat P. V. Department of Information Technology.
Various Problem Solving Approaches. Problem solving by analogy Very often problems can be solved by looking at similar problems. For example, consider.
Problem Solving: Brute Force Approaches
CSCI 104 Backtracking Search
Merge Sort 7/29/ :21 PM The Greedy Method The Greedy Method.
Design and Analysis of Algorithm
Artificial Intelligence Problem solving by searching CSC 361
Bin Packing Optimization
Topic 25 Dynamic Programming
Problem Solving: Brute Force Approaches
Dynamic Programming.
Merge Sort 11/28/2018 2:18 AM The Greedy Method The Greedy Method.
The Greedy Method Spring 2007 The Greedy Method Merge Sort
Merge Sort 11/28/2018 8:16 AM The Greedy Method The Greedy Method.
Brute Force Approaches
Kevin Mason Michael Suggs
Advanced Algorithms Analysis and Design
Merge Sort 1/17/2019 3:11 AM The Greedy Method The Greedy Method.
Matthew Renner, Trish Beeksma, Patch Kenny
Dynamic Programming.
Computer Hardware Optimization
Merge Sort 4/28/ :13 AM Dynamic Programming Dynamic Programming.
The N-Queens Problem Search The N-Queens Problem Most slides from Milos Hauskrecht.
Merge Sort 5/2/2019 7:53 PM The Greedy Method The Greedy Method.
Alex Bolsoy, Jonathan Suggs, Casey Wenner
Lecture 4: Tree Search Strategies
Applications of Arrays
Presentation transcript:

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

Formal Statement

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.

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.

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 )

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

Brute Force Algorithm

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

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.

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.

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

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.

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

Greedy Algorithm Greed is not always good

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 Above 80 Percent Best value Above 85 Percent Best value Greedy Any Percent Best value Above 80 Percent Best value Above 85 Percent Best value 24718

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

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.

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

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.