Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Road to WIN – RTanque

Road to WIN – RTanque

RITISI Challenge and Ironhack organize a contest. Make your tank, improve and survive!

Kiko Beats

May 08, 2014
Tweet

More Decks by Kiko Beats

Other Decks in Programming

Transcript

  1. #{WHAT IS RITSI CHALLENGE} • Learn Ruby principles $ gem

    install rtanque https://github.com/awilliams/RTanque
  2. #{WHAT IS RITSI CHALLENGE} • Learn Ruby principles • Know

    RTanque gem $ gem install rtanque https://github.com/awilliams/RTanque
  3. #{WHAT IS RITSI CHALLENGE} • Learn Ruby principles • Know

    RTanque gem • Develop IA tank $ gem install rtanque https://github.com/awilliams/RTanque
  4. #{WHAT IS RITSI CHALLENGE} • Learn Ruby principles • Know

    RTanque gem • Develop IA tank • Improve and survive $ gem install rtanque https://github.com/awilliams/RTanque
  5. #{WHAT IS RITSI CHALLENGE} • Learn Ruby principles • Know

    RTanque gem • Develop IA tank • Improve and survive • Win Ironhack course! $ gem install rtanque https://github.com/awilliams/RTanque
  6. #{FIRST STEPS} Learn the API Sensors • ticks • health

    • position • health • speed • radar_heading • turret_heading
  7. #{FIRST STEPS} Learn the API Sensors • ticks • health

    • position • health • speed • radar_heading • turret_heading Command • Speed • Heading • radar_heading • turret_heading • fire
  8. #{FIRST STEPS} Basic algorithm 1. Sensors 2. Movement 
 #

    Gather information # Decide where to move
  9. #{FIRST STEPS} Basic algorithm 1. Sensors 2. Movement 3. Action

    # Gather information # Decide where to move # Act accordingly
  10. #{IMPROVE} "First do it, then do it right, then do

    it better" – Addy Osmani, Google engineer
  11. #{IMPROVE} • What doesn't work in my algorithm • Try

    to improve it "My shots are lost all time because tanks are in movement" !
  12. #{IMPROVE} • What doesn't work in my algorithm • Try

    to improve it "My shots are lost all time because tanks are in movement" ! "I need a better movement strategy"
  13. #{IMPROVE} • What doesn't work in my algorithm • Try

    to improve it "My shots are lost all time because tanks are in movement" ! "I need a better movement strategy" #firstworldproblems
  14. #{IMPROVE} "My shot lose all time because tanks are in

    movement" First notion: Apply linear movement principle (MRUA)
  15. #{IMPROVE} "My shot lose all time because tanks are in

    movement" First notion: Apply linear movement principle (MRUA) • We know opponent position in each tick !
  16. #{IMPROVE} "My shot lose all time because tanks are in

    movement" First notion: Apply linear movement principle (MRUA) • We know opponent position in each tick • It's possible to calculate opponent speed
  17. #{IMPROVE} "My shot lose all time because tanks are in

    movement" First notion: Apply linear movement principle (MRUA) • We know opponent position in each tick • It's possible to calculate opponent speed • I can shoot in an estimate future position!
  18. #{IMPROVE} "My shot lose all time because tanks are in

    movement" First notion: Apply linear movement principle (MRUA) • We know opponent position in each tick • It's possible to calculate opponent speed • I can shoot in an estimate future position!
  19. #{IMPROVE} "I need a better movement strategy" First notion: Circular

    movement is too limited • But works fine !
  20. #{IMPROVE} "I need a better movement strategy" First notion: Circular

    movement is too limited • But works fine • Bots have simply movement too
  21. #{IMPROVE} "I need a better movement strategy" First notion: Circular

    movement is too limited • But works fine • Bots have simply movement too • Can combine my movement with bots movements
  22. #{IMPROVE} "I need a better movement strategy" First notion: Circular

    movement is too limited • But works fine • Bots have simply movement too • Can combine my movement with bots movements
  23. #{IMPROVE} But the question is.... • Make a simply tank

    • Improve your tank (do it) (do it right)
  24. #{IMPROVE} But the question is.... How I know if my

    tank is better now? • Make a simply tank • Improve your tank (do it) (do it right)
  25. #{IMPROVE} But the question is.... How I know if my

    tank is better now? • Make a simply tank • Improve your tank (do it) (do it right) measure it! (do it better)