-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wip: adding basis for caspar #6648
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6648 +/- ##
============================================
- Coverage 29.15% 29.12% -0.03%
- Complexity 15454 15472 +18
============================================
Files 2876 2884 +8
Lines 280447 280838 +391
Branches 49383 49419 +36
============================================
+ Hits 81758 81792 +34
- Misses 193203 193558 +355
- Partials 5486 5488 +2 ☔ View full report in Codecov by Sentry. |
* @param gameState The current game state | ||
* @return A strategic value score | ||
*/ | ||
private double calculateStrategicValue(Hex hex, GameState gameState) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
* @param gameState The current game state | ||
* @return A strategic value score | ||
*/ | ||
private double calculateStrategicValue(Hex hex, GameState gameState) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
List<TacticalObjective> sortedObjectives = objectives.values().stream() | ||
.sorted((a, b) -> Double.compare(b.getPriority(), a.getPriority())) | ||
.toList(); |
Check notice
Code scanning / CodeQL
Unread local variable Note
* @param availableObjectives Available objectives | ||
* @return The best matching objective, or null if none | ||
*/ | ||
private TacticalObjective findBestObjective(Formation formation, List<TacticalObjective> availableObjectives) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
return longRangePaths; | ||
} | ||
|
||
protected Map<Integer, List<MovePath>> getUnitPaths() { | ||
public Map<Integer, List<MovePath>> getUnitPaths() { |
Check notice
Code scanning / CodeQL
Exposing internal representation Note
after this call to getUnitPaths
* @param gameState The current game state | ||
* @return The selected firing solution | ||
*/ | ||
public FiringPlan determineFiringPlan(Entity unit, List<Entity> possibleTargets, GameState gameState) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
* @param adjacent List of adjacent valid coordinates | ||
* @return Score value (higher is better) | ||
*/ | ||
double scorePosition(Coords coord, List<Coords> adjacent); |
Check notice
Code scanning / CodeQL
Useless parameter Note
NeuralNetwork model = trainModel(modelName, level, dataset, architecture, epochs, batchSize); | ||
model.saveModel(modelName, level); | ||
} catch (Exception e) { | ||
logger.error(e, "Failed to train model for {}", level); |
Check warning
Code scanning / CodeQL
Unused format argument Warning
double[][][] weights = new double[architecture.getLayerCount() - 1][][]; | ||
double[][] biases = new double[architecture.getLayerCount() - 1][]; | ||
|
||
Random random = new Random(level.ordinal() * 1000 + architecture.hashCode()); |
Check warning
Code scanning / CodeQL
Result of multiplication cast to wider type Warning
int multiplication
} | ||
|
||
|
||
this.epochs = Integer.parseInt(args[0]); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException Note
* @param depth Maximum path generation depth | ||
* @return List of generated paths | ||
*/ | ||
List<MovePath> generatePaths(Entity unit, GameState gameState, double depth); |
Check notice
Code scanning / CodeQL
Useless parameter Note
* @param depth Maximum path generation depth | ||
* @return List of generated paths | ||
*/ | ||
List<MovePath> generatePaths(Entity unit, GameState gameState, double depth); |
Check notice
Code scanning / CodeQL
Useless parameter Note
No description provided.