Models and solutions of strategic resource allocation problems: Approximate equilibrium and online learning in Blotto games