Difference between revisions of "User:Tkiesel/Dev Notebook"

From Robowiki
Jump to navigation Jump to search
m (reordering, details)
m (link fix)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
== DeBroglie Roadmap / Development notepad / Brainstorming Sandbox ==
+
[[User:Tkiesel/Copernicus|Copernicus]] dev sandbox, notes and such
  
# Precise Prediction + Wall Smoothing in order to calculate Precise MEAs and get ready for Wave Surfing.
+
== Timing ==
#* <span style="text-decoration: line-through;">Dilemma - Roll my own or utilize someone else's?</span> 
+
 
#* see [[User:Tkiesel/MovementPredictor]]
+
=== Plan ===
# Implement Wave Surfing
+
 
#* Farewell Aristocles. You were a faithful friend, if a bit dodgy during round 1. ;)
+
In order to do stat decay right, I realized that I need proper timekeeping. Rather than try to work with rounds and ticks, I'll keep a single '''''long''''' that holds the elapsed ticks since the start of the match.  Stat decay becomes easier to deal with in a more granular fashion with cross-round timekeeping.
#* GoTo is what DeBroglie used to have, but TrueSurfing seems more philosophically satisfying at the moment...
+
 
#* Danger function to include a term for field position? Corners are bad after all, and a slightly increased hit risk might be worth it to get out of a corner.
+
Since I'm at it, paying attention to time means I can do proper(ish) interpolation of enemy state in melee and after skipped 1v1 turns.
#* Eventually, the pluggable EndPredictionCondition interface in MovementPredictor should make surfing multiple waves easier.. and allow me to handle cases like the following via a discrete Class that can handle the details:
+
 
#** Wave A and Wave B are coming toward you. If you orbit clockwise or stop, Wave A will hit first. Remove Wave A and predict-surf remaining waves. If you orbit counter-clockwise, wave B will hit you first. Remove Wave B and predict-surf remaining waves
+
=== Notes and Reminders ===
# Get a small Virtual Gun array going. Main GF gun, anti-adaptive GF gun, circular targeter, dead-stop targeter. For kicks. ;)
+
 
#* Weight points in anti-adaptive gun via half-life based on round number.
+
* Stop counting ticks if Copernicus is dead or all enemies are dead.
#** Pre-calculate decay exponentials and store in array. Just one extra array lookup and one extra multiplication per data point.. shouldn't be terribly slower than main gun.
+
* Test across rounds.
#* Test choosing gun via history of this shot (the k-nearest-neighbors can report which gun did best on them) vs. general history of the match..  Probably lots of trade-offs here.
+
* Probably go with linear stat decay or something more CPU-friendly. Half-lives were murder in deBroglie, and caused use of a less effective decay-by-round strategy.
# Bullet Shadows (fairly easy with the Universe/Bot structure)
+
 
# Debug and Evaluate how the bot works in the Rumble without extensive tuning.
+
=== To Do ===
# <span style="text-decoration: line-through;">Download and get [[RoboResearch]] working.</span>
+
 
#* Code a version of Debroglie to read/write dimension weights and real/virtual wave weighting from a .txt file. Let it chew on the [[Targeting Challenge RM]] bots for a week or two to explore the solution space.
+
# <del>Work this code up in barebones SittingDuck Copernicus.</del>
#* Pick the few best local maxima, do some runs that explore the space near them.
+
# <del>Move code to Universe.</del>
#* Repeat all of this for the anti-adaptive gun with some relevant bots.
+
 
#* Repeat with movement weights using [[Movement Challenge 2K7|MC2K7]], etc.
+
== Universe ==
 +
 
 +
=== Plan ===
 +
 
 +
The Bot class is going to get a complete clean-out. A Bot no longer handles another Bot as enemy. This prevented any melee work and made deBroglie a 1v1 specialist. In Copernicus, there will be one Bot per robot in the match and pairwise stats between bot pairs (and thus 1v1) will be handled by another Object.  For performance, each bot will keep a rolling buffer of previous state now, rather than instantiating a stipped down copy of itself as done previously.
 +
 
 +
The Wave class needs a similar cleanout. The precise intersection code and basic structural elements should stay from deBroglie, but the Wave itself should no longer handle its own BracketHist objects. Let a customized stats object do that.
 +
 
 +
=== Notes and Reminders ===
 +
 
 +
* Waves should be timestamped with firetime. This lets the stats object index Bot situation from n ticks ago to get the fully proper stats picture. This also lets Copernicus use Gun Heat Waves by launching expected waves for surfing, then tagging/updating/deleting them later on as needed.
 +
 
 +
=== To Do ===
 +
 
 +
# Clean out and stip down Bot.
 +
# Add time awareness and previous state buffer to Bot.
 +
# Add state interpolation to Bot.
 +
# Clean out Wave.
 +
# Hunt for any performance improvements in the Wave intersection code.
 +
# Get Universe to cleanly handle the new Bots.
 +
# Write PSO (see below) to handle Bots and Waves.
 +
 
 +
== Pairwise Stats Object ==
 +
 
 +
=== Plan ===
 +
 
 +
This needs a design, and a name!
 +
 
 +
=== Notes and Reminders ===
 +
 
 +
=== To Do ===
 +
 
 +
== BracketHist ==
 +
 
 +
=== Plan ===
 +
 
 +
The bit of code I'm happiest with from deBroglie, all told. All this needs is bullet shadows and any performance/kernel tweaks I can give it!
 +
 
 +
=== Notes and Reminders ===
 +
 
 +
* Bullet shadows need to be removable. This means they can't simply be baked into the histogram. Therefore, surfing danger lookup gets more expensive. :( This means performance gains in other areas must be found.
 +
 
 +
=== To Do ===
 +
 
 +
# Implement Bullet Shadows.. addable and removable.
 +
 
 +
== Melee ==
 +
 
 +
=== Plan ===
 +
 
 +
For now, import minimum risk movement and preferential targeting from Leibniz. Use these when # enemies > 1.  When enemies <= 1, use 1v1 objects.
 +
 
 +
=== Notes and Reminders ===
 +
 
 +
# The Leibniz targeter chooses a bot to shoot at, heavily weighting by closeness to other bots and by closeness to death. This isn't exactly the same as the Shadow Melee gun, but not terribly far from it. Should be fun to see how it does.
 +
 
 +
=== To Do ===
 +
 
 +
# Import Leibniz radar, gun and movement into objects callable by Copernicus.
 +
# rewrite the Leibniz code to call on Universe for data.

Latest revision as of 19:24, 20 February 2013

Copernicus dev sandbox, notes and such

Timing

Plan

In order to do stat decay right, I realized that I need proper timekeeping. Rather than try to work with rounds and ticks, I'll keep a single long that holds the elapsed ticks since the start of the match. Stat decay becomes easier to deal with in a more granular fashion with cross-round timekeeping.

Since I'm at it, paying attention to time means I can do proper(ish) interpolation of enemy state in melee and after skipped 1v1 turns.

Notes and Reminders

  • Stop counting ticks if Copernicus is dead or all enemies are dead.
  • Test across rounds.
  • Probably go with linear stat decay or something more CPU-friendly. Half-lives were murder in deBroglie, and caused use of a less effective decay-by-round strategy.

To Do

  1. Work this code up in barebones SittingDuck Copernicus.
  2. Move code to Universe.

Universe

Plan

The Bot class is going to get a complete clean-out. A Bot no longer handles another Bot as enemy. This prevented any melee work and made deBroglie a 1v1 specialist. In Copernicus, there will be one Bot per robot in the match and pairwise stats between bot pairs (and thus 1v1) will be handled by another Object. For performance, each bot will keep a rolling buffer of previous state now, rather than instantiating a stipped down copy of itself as done previously.

The Wave class needs a similar cleanout. The precise intersection code and basic structural elements should stay from deBroglie, but the Wave itself should no longer handle its own BracketHist objects. Let a customized stats object do that.

Notes and Reminders

  • Waves should be timestamped with firetime. This lets the stats object index Bot situation from n ticks ago to get the fully proper stats picture. This also lets Copernicus use Gun Heat Waves by launching expected waves for surfing, then tagging/updating/deleting them later on as needed.

To Do

  1. Clean out and stip down Bot.
  2. Add time awareness and previous state buffer to Bot.
  3. Add state interpolation to Bot.
  4. Clean out Wave.
  5. Hunt for any performance improvements in the Wave intersection code.
  6. Get Universe to cleanly handle the new Bots.
  7. Write PSO (see below) to handle Bots and Waves.

Pairwise Stats Object

Plan

This needs a design, and a name!

Notes and Reminders

To Do

BracketHist

Plan

The bit of code I'm happiest with from deBroglie, all told. All this needs is bullet shadows and any performance/kernel tweaks I can give it!

Notes and Reminders

  • Bullet shadows need to be removable. This means they can't simply be baked into the histogram. Therefore, surfing danger lookup gets more expensive. :( This means performance gains in other areas must be found.

To Do

  1. Implement Bullet Shadows.. addable and removable.

Melee

Plan

For now, import minimum risk movement and preferential targeting from Leibniz. Use these when # enemies > 1. When enemies <= 1, use 1v1 objects.

Notes and Reminders

  1. The Leibniz targeter chooses a bot to shoot at, heavily weighting by closeness to other bots and by closeness to death. This isn't exactly the same as the Shadow Melee gun, but not terribly far from it. Should be fun to see how it does.

To Do

  1. Import Leibniz radar, gun and movement into objects callable by Copernicus.
  2. rewrite the Leibniz code to call on Universe for data.