190 likes | 342 Views
Resource Allocation in Massive Multiplayer Online Gaming. Honors Oral Presentation. Christopher Klumph Spring 2008. Summary of Project. senior design project: “Projects in Heterogeneous Computing” explored resource allocation in a M assive M ultiplayer O nline G ame (MMOG)
E N D
Resource Allocation in Massive Multiplayer Online Gaming Honors Oral Presentation Christopher Klumph Spring 2008
Summary of Project • senior design project: “Projects in Heterogeneous Computing” • explored resource allocation in a Massive Multiplayer Online Game (MMOG) • included research, programming, testing, simulation • investigated multiple heuristics and algorithms • produced usable results • still in progress
What is a Massive Multiplayer Online Game (MMOG)? • players control an avatar that interacts with objects and other players in a virtual world environment • World of Warcraft most popular MMOG with over 10 million players World of Warcraft
Resource Allocation in a MMOG • must somehow connect all computers via server(s) • this heterogeneous system has • varying computer capabilities (e.g. processor, memory, etc.) • varying communication times between players’ computers
Pn Pn-1 P1 … Main Server (MS) P2 P6 P3 P5 P4 Problem Statement all players connected directly to main server (MS) initial acquisition of servers is expensive requires server administration architecture hard to scale based on demand Cons
Pn Pn-1 Pn P1 … Pn-1 Main Server (MS) Main Server (MS) P2 P6 P1 … P2 P6 P3 P5 P3 P5 P4 P4 Problem Statement all players connected directly to main server (MS) vs. players connected to MS directly or through secondary server (SS) SS2 SS6
Heuristics • algorithm used to probe search space for “good enough” solution • project involved simulation of 1 main server and 200 players • NP-complete problem • 200200 possible configurations • heuristics explored: • Dual-Iterative Minimization (DIM) • Genetic Algorithm • K-Optimized Dual-Iterative (KODI) • Tabu Search • Discrete Particle Swarm Optimization • Genitor
Terminology and Goals of Project Goals Terminology • given that 200 players are connected directly to the MS • reconnect players to either MS or SS to minimize RTmax • use multiple heuristics to find valid mappings • must determine three things: • number of SSs • who becomes an SS • what players connect to those SSs • MS : Main Server • SS: Secondary Server • RTmax: maximum response time between players’ computers and MS • chromosome: represents a mapping of players and servers (who’s connected to whom)
Chromosome Example MS SS(P6) SS (P2) players 1 and 3 are connected to SS (P2) players 4 and 5 are connected directly to MS players 7 and 8 are connected to SS (P6) P4 P1 P8 P5 P7 P3
Genitor Overview genitor_heuristic() { generate_initial_population; ranking; while(stopping criteria not met) { selection; crossover; mutation; ranking; } output best solution found; } • selection: selects 2 random parents using roulette wheel selection • crossover: picks 2 random points within parents and swaps all data elements within those points between parents to create offspring • mutation: randomly mutates elements within offspring with predetermined probability • ranking: evaluates new chromosomes based on RTmax and sorts them into ranked list • stopping criteria: 10,000 iterations with no change in the (current) best solution or 10 minutes
Initial Population and Ranking • initial population generation • MS – connected to main server(MS) as a player • SS– player is a secondary server • 1-8 – player is connected to that SS • randomly generates 200 chromosomes • ranking (R#) • create ranked list based on each chromosome’s RTmax
Selection and Crossover • selection • two parents • roulette wheel selection • crossover - two point Point 1 Point 2 swap the 3 through 6 portion
Crossover Fixing • fixing – line not always valid check that all players match up to valid SS or MS assign the players to the known SS or to MS such that RTMAX is minimized
Mutation • randomly swap numbers • 0.1% chance rank each chromosome, then sort into mapping
Repeat and Final Output • drop two lowest-ranking chromosomes • repeat until 10,000 iteration of no change in best solution or 10 minutes • output best solution • at location Rank 1 • done
Changes in Genitor • objective function • old: RTmax = 2 x Comm(Px, SSy) + Comp(SSy) + 2 x Comm(SSy, MS) + Comp(MS) • new: RTmax = Comm(Px, SSy) + Comp(SSy) + Comm(SSy, MS) + 2∙Comp(MS) + Comm(MS, SSy) + Comm(SSy, Px) • crossover fixing • old: invalid mappings randomly assigned to new SSs • new: invalid mappings assigned to achieve lowest RTmax
Results 1,262 lines of code written in C++
Results (continued) learned about frequently-used heuristics wrote, debugged, and simulated a Genetic Algorithm, Genitor, and extracted results from each implemented changes in simulation model objective function asymmetric communication times adapted other heuristics to these changes Tabu search Dual-Iterative Minimization currently adapting heuristics to part 2 of project by introducing robustness
Acknowledgments • Kody Willman • Professor H.J. Siegel • Luis Briceño • Samee Khan • Heterogeneous Computing Research Group • Professor Maciejewski • Professor Kwok • Professor Potter • Jay Smith • Vladimir Shestak Questions?