Skip to content

Defend the Wall from White Walkers using optimization algorithms

Notifications You must be signed in to change notification settings

davemckenna01/defendthewall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

###Defend the Wall from White Walkers using optimization algorithms

This Game of Thrones inspired optimization exercise tries to find an even distribution of resources to defend three castles based on the cumulative skill ratings of the individual resouces. Out of trillions of possible configurations, the algorithm uses an optimization technique inspired by genetics/evolution to quickly find an almost perfect - and sometimes perfect - combination of resources. The algorithm starts with a random configuration each time it is run, so some results are more optimal than others. Due to the nature of this particular problem, perfect solutions are frequently produced.

TODO: The domain, representation, and cost function can be made to be generic so that it will handle a wider range of resourcing problems, not just defense of fictional castles, and not just dealing with 2 skills/properties per resource. For example, real-world human resourcing challenges, computing resource optimization, etc.

###To run in python shell:

import defend
solution = defend.optimization.geneticoptimize(defend.domain, defend.defendcost)
defend.printdefense(solution)

About

Defend the Wall from White Walkers using optimization algorithms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages