150 likes | 271 Views
Senior Design Project 2 nd Semester Update. Chris Klumph and Kody Willman Spring 2008. Resource Allocation in a MMOG. in a m assive m ultiplayer o nline g ame ( MMOG ) multiple players are simultaneously connected to a virtual game world at any given time this heterogeneous system has
E N D
Senior Design Project2nd Semester Update Chris Klumph and Kody Willman Spring 2008
Resource Allocation in a MMOG • in a massive multiplayer online game (MMOG) multiple players are simultaneously connected to a virtual game world at any given time • this heterogeneous system has • varying computer capabilities (e.g. processor, memory, etc.) • varying communication times between players’ computers
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
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 • RTmax • maximum response time between players’ computers and MS • heuristic • way to allocate resources (servers) • problem analogous to mapping tasks to machines (NP complete) • 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
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
K-Optimized Dual Iterative Minimization KODI • 200 users • k initial SS created • for 10-30 iterations • run Phase 1 • run Phase 2 • compare RTmax times at each Phase • output best solution
Formulas RTmax Pct • Px: player x • SSa: secondary server a • RTmax = Comm(Px, SSa) + Comp(SSa) + Comm(SSa, MS) + 2∙Comp(MS) + Comm(MS, SSa) + Comm(SSa, Px) • DCU: directly connected user • Px: player x • S: server (can be SS or MS) • Pct (player connection time) = Comm(Px, S) + Comm(S, Px)
Min-Min RT • given a predetermined set of DCU’s, all players that are not in the set of DCU’s are marked as unassigned • for each unassigned player, the server (MS or DCU) that gives the minimum RT is determined • the pair, <player, server> with the smallest RT among those generated in step 2 is selected • the player in the best pair selected from step 3 is then assigned to the corresponding server • steps 2 through 4 repeated until all players assigned
DCU Min-Min • given a predetermined set of DCU’s, all players that are not in the set of DCU’s are marked as unassigned • for each unassigned player, the server (DCU only) that provides the minimum RT is determined • the pair, <players, server> with the smallest RT among all generated in step 2 is selected • the player in the best pair selected is then assigned to the corresponding server • steps 2 through 4 repeated until all players assigned
Phase 1 • iteratively adjusts the number of DCUs to minimize RTmax • randomly pick k, between 1 and 200, for initial DCUs • randomly assign k players as DCU • finish assignment of 200-k players using DCU Min-Min • find player with RTmax and if • player: unmap, and remap using Min-Min RT • DCU: (no players connected) unmap, and remap using Min-Min RT • repeat 5 for 1000 iterations or no improvement
Phase 2 • iteratively adjusts the connection times of players to minimize the RTmax • find player that has the largest connection time Pct • for that Pct player if it is • DCU: unmap it, and all players connected through it, and remap using Min-Min RT • player: unmap, and remap using Min-Min RT • check if new mapping results in lower RTmax time otherwise keep previous • repeat steps 2 and 3 for 1000 iterations or no improvement is found in the solution
Results from 1st Semester learned about frequently-used heuristics implemented, debugged, and simulated the following: genetic algorithm genitor kodi (k-optimized dual iterative) minimization obtained results from all heuristics, focused on genitor and kodi minimization part 1 of project does not consider robustness
Goals for 2nd Semester changes in simulation model objective function asymmetric communication times other heuristics must be adapted to RTmax changes tabusearch dual-iterative minimization discrete particle swarm optimization adapt heuristics to part 2 of project by introducing robustness