Will AI Make Cyber Swords or Shields: A few mathematical models of technological progress