feat(PPO_Bot): command abstraction layer — goto/aimTo controllers (#24)
- Add gotoTick/aimToTick controller functions (#25) - Update network dims: actor 5→6, state 42→44 (#26) - Rewrite mapActions for 6-dim command space (#27) - Delete stale weight files (shape mismatch) - Fix existing tests for new signatures Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,9 +40,9 @@ public class RunBattle {
|
||||
idToName.put(p.getId(), p.getName());
|
||||
System.out.printf(" #%d %s%n", p.getId(), p.getName());
|
||||
}
|
||||
System.out.printf("%-6s %-4s %-30s %-30s %-20s%n",
|
||||
"Turn", "Id", "Name", "RadarDir", "Event");
|
||||
System.out.println("-".repeat(95));
|
||||
System.out.printf("%-6s %-12s %-21s %-12s %-10s %-10s%n",
|
||||
"Turn", "Name", "Position", "Direction", "Speed", "RadarDir");
|
||||
System.out.println("-".repeat(80));
|
||||
});
|
||||
|
||||
handle.getOnTickEvent().on(owner, event -> {
|
||||
@@ -52,12 +52,16 @@ public class RunBattle {
|
||||
for (var state : event.getBotStates())
|
||||
if (state.getName() != null) idToName.putIfAbsent(state.getId(), state.getName());
|
||||
|
||||
// Print radar direction for every bot
|
||||
// Print position/speed/direction for every bot
|
||||
for (var state : event.getBotStates()) {
|
||||
String name = idToName.getOrDefault(state.getId(),
|
||||
state.getName() != null ? state.getName() : "#" + state.getId());
|
||||
System.out.printf("%-6d %-4d %-30s %-30.2f%n",
|
||||
turn, state.getId(), name, state.getRadarDirection());
|
||||
System.out.printf("%-6d %-12s pos=(%-6.1f,%-6.1f) dir=%-7.2f spd=%-6.2f radar=%-7.2f%n",
|
||||
turn, name,
|
||||
state.getX(), state.getY(),
|
||||
state.getDirection(),
|
||||
state.getSpeed(),
|
||||
state.getRadarDirection());
|
||||
}
|
||||
|
||||
// Print any scan events on the same tick
|
||||
|
||||
Reference in New Issue
Block a user