Skip to content
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

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft

Conversation

Scoppio
Copy link
Collaborator

@Scoppio Scoppio commented Mar 3, 2025

No description provided.

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.12%. Comparing base (e3a6397) to head (59b26c1).
Report is 43 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

* @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

The parameter 'hex' is never used.
* @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

The parameter 'gameState' is never used.
Comment on lines +251 to +253
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

Variable 'List sortedObjectives' is never read.
* @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

The parameter 'formation' is never used.
return longRangePaths;
}

protected Map<Integer, List<MovePath>> getUnitPaths() {
public Map<Integer, List<MovePath>> getUnitPaths() {

Check notice

Code scanning / CodeQL

Exposing internal representation Note

getUnitPaths exposes the internal representation stored in field unitPaths. The value may be modified
after this call to getUnitPaths
.
@Scoppio Scoppio self-assigned this Mar 9, 2025
@Scoppio Scoppio added Princess/AI PACAR Any Issues related to the PACAR (Princess Abstract Combat Auto Resolve) System labels Mar 9, 2025
* @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

The parameter 'gameState' is never used.
* @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

The parameter 'adjacent' is never used.
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

This format call refers to 0 argument(s) but supplies 1 argument(s).
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

Potential overflow in
int multiplication
before it is converted to long by use in an invocation context.
}


this.epochs = Integer.parseInt(args[0]);

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.
* @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

The parameter 'gameState' is never used.
* @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

The parameter 'depth' is never used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PACAR Any Issues related to the PACAR (Princess Abstract Combat Auto Resolve) System Princess/AI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants