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

Genetic programming refactor #25

Merged
merged 71 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
81e108e
DefaultGPAlgorithm fix. SinglePointCrossover and SingleTreeNodeMutati…
MarkoSmid2 Apr 18, 2023
b2dd96b
Add support for minTreeSize. Redundant code remove. Code optimization.
MarkoSmid2 Apr 20, 2023
94040e9
Important fix on CrossoverOperator
MarkoSmid2 Apr 20, 2023
2a83e97
TreeNode functions optimization
MarkoSmid2 Apr 20, 2023
fe98c59
Implementation of makeFeasible
MarkoSmid2 Apr 20, 2023
2013b0f
Implementation of makeFeasible
MarkoSmid2 Apr 20, 2023
ee0c74e
TreeNode function bug fixes. ProgramPRoblem tree prunning fix
MarkoSmid2 Apr 23, 2023
98419e9
Added support for custom operators. File reorganization.
MarkoSmid2 May 29, 2023
9e683bd
Added GUI for GP Algorithms
MarkoSmid2 Jun 6, 2023
7506895
Added extra graphs (tree height, tree size) on UI
MarkoSmid2 Jun 8, 2023
7d0b7ca
Small fix
SmidMarko Aug 24, 2023
3b94fd4
Added new base classes
SmidMarko Oct 27, 2023
121ad84
genetic programming refactor in clone files.
SmidMarko Oct 29, 2023
75849c1
Genetic programming refactor part 2
SmidMarko Nov 9, 2023
6c2e92e
Add support for population and task serialization
SmidMarko Nov 11, 2023
f34e544
Visualization support + HomeForm update
SmidMarko Nov 11, 2023
41b6b2a
HomeForm update
SmidMarko Nov 11, 2023
38042fa
Original files with connected with GP removed
SmidMarko Nov 12, 2023
33fdd7b
Original GP files removed. HomeForm update
SmidMarko Nov 12, 2023
6e13439
Load & save gpAlgorithm data from file in HomeForm
SmidMarko Nov 12, 2023
ab32d26
HomeForm update, soccer problem update
SmidMarko Nov 13, 2023
9a6db4a
GP HomeForm update
SmidMarko Nov 14, 2023
43f60f5
GP HomeForm update
SmidMarko Nov 17, 2023
6f6c74d
Behaviour tree action nodes update
SmidMarko Nov 19, 2023
6bc4165
Soccer problem actions update
SmidMarko Nov 25, 2023
9fe1e54
Added nodes for Robocode problem. Code refactor
SmidMarko Feb 11, 2024
8e90321
Added tree size frunning operator
SmidMarko Feb 13, 2024
99f3242
Node definition updates
SmidMarko Feb 22, 2024
6780a3d
.gitignore update
SmidMarko Feb 28, 2024
1ed5a2a
Code refactor
SmidMarko Feb 28, 2024
e983975
Code refactor. Mutation big fix
SmidMarko Feb 28, 2024
1d55b4f
Code refactor/cleanup
SmidMarko Feb 28, 2024
b3bf419
Added feasible check when generating an individual
SmidMarko Feb 28, 2024
c568a28
Added support for Fitness individual values
SmidMarko Mar 3, 2024
6a76822
TestAlgorithmState run
SmidMarko Mar 3, 2024
6eda2a1
Rebase fixes
SmidMarko Mar 3, 2024
009a0f1
.gitignore update
SmidMarko Mar 4, 2024
167cbe5
.gitignore update
SmidMarko Mar 4, 2024
c94e336
Added images init dir
SmidMarko Mar 4, 2024
784f24f
HomeForm rename to GPInterface
SmidMarko Mar 5, 2024
14de23e
GUI update with fitness individual values
SmidMarko Mar 6, 2024
70ce2aa
Minor changes in RayHitObject, Node, GPAlgorithm...
SmidMarko Apr 4, 2024
fca8ba2
Added ElitismGPAlgorithm, minor changes
SmidMarko Apr 19, 2024
33ef960
UI update. Added JSON conf load.
SmidMarko May 31, 2024
f3670f0
Elitism implementation update
SmidMarko Jun 18, 2024
8189ddc
Logging, robostrike problem, minor updates
SmidMarko Jul 17, 2024
73b6682
Added:
SmidMarko Jul 19, 2024
3bab0e7
GpInterface.form commit
SmidMarko Jul 19, 2024
e2b5e53
.gitignore update
SmidMarko Jul 19, 2024
33880c1
Minor fix
SmidMarko Jul 19, 2024
eb14d6d
Bloat control method update. Elitism alg update
SmidMarko Jul 20, 2024
db75f05
GP Node Call frequency count operator added
SmidMarko Jul 27, 2024
5673e4c
Added GoalNode
SmidMarko Aug 6, 2024
19ffb7b
GoalNode Implementation + test pt3
SmidMarko Aug 7, 2024
11d55f4
GPInterface refactor pt1.
SmidMarko Aug 14, 2024
fc2ca9f
Add PredefinedEncapsNodesGPAlgorithm. Code rebase
SmidMarko Aug 14, 2024
3497ee2
GP refactor. GP algorithms update (Not Tested!!!)
SmidMarko Aug 15, 2024
4306ece
GP Refactor. GPAlgorithm update. Not finished!
SmidMarko Aug 16, 2024
ac9e8a0
GPAlgorithmExecutor update. Code cleanup.
SmidMarko Aug 17, 2024
bc27904
Added support for SymbolicReg. in GPInterface
SmidMarko Aug 17, 2024
4a8e837
UI update, JSON update ( NOT TESTED - TODO)
SmidMarko Aug 17, 2024
0f9ca8a
Testing. Minor changes
SmidMarko Aug 18, 2024
1c4817a
Minor changes. Version prepare
SmidMarko Sep 20, 2024
80fe1fd
Minor changes. Version prepare
SmidMarko Sep 20, 2024
db95306
GPInterface update
SmidMarko Sep 24, 2024
2d49004
Meta files update
SmidMarko Sep 24, 2024
29f4a87
images folder commit.
SmidMarko Sep 24, 2024
13af723
Major bug fixes(crossover, pruning op, selection)
SmidMarko Oct 3, 2024
7a41a61
Minor bug fixes for symbolic regr. in GpInterface
SmidMarko Oct 3, 2024
88e8031
GPAlgorithms refactoring, bug fixes.
SmidMarko Oct 4, 2024
bd06a4d
sendEvaluateRequest parameter changed.
SmidMarko Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
/test.csv
/CRS tuning_GSAM25F1.0Cr1.0_1494572043987.txt
/build/
TestBTe.*
TestBTree.*

## Java

Expand Down Expand Up @@ -143,3 +145,4 @@ Thumbs.db
!/ios-moe/xcode/*.xcodeproj/xcshareddata
!/ios-moe/xcode/*.xcodeproj/project.pbxproj
/ios-moe/xcode/native/
out/production
3 changes: 3 additions & 0 deletions META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: org.um.feri.ears.visualization.gp.GPInterface

20 changes: 18 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'org.openjfx.javafxplugin' version '0.0.13'
id 'org.beryx.jlink' version '2.25.0'
}

idea {
Expand All @@ -16,8 +18,8 @@ repositories {
}

//compatibility for reflection support
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 16
targetCompatibility = 16

dependencies {
implementation fileTree(dir: 'lib', include: ['*.jar'])
Expand Down Expand Up @@ -46,6 +48,8 @@ dependencies {
implementation 'net.sf.epsgraphics:epsgraphics:1.2'
implementation group: 'org.javassist', name: 'javassist', version: '3.24.0-GA'
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: '2.12.1'
implementation 'com.fasterxml.jackson.core:jackson-core:2.16.1'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.16.1'
implementation 'org.jetbrains:annotations:13.0'
implementation 'org.apache.commons:commons-math3:3.6.1'
implementation 'org.apache.commons:commons-rng-core:1.4'
Expand Down Expand Up @@ -86,3 +90,15 @@ configurations {
jar.archiveFileName = 'ears.jar'
}

javafx {
version = '17.0.7'
modules = ['javafx.controls', 'javafx.fxml']
}

jlink {
imageZip = project.file("${buildDir}/distributions/app-${javafx.platform.classifier}.zip")
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'app'
}
}
Binary file added gpAlgorithmState.ser
Binary file not shown.
113 changes: 113 additions & 0 deletions out/artifacts/EARS_jar/ears_config_robostrike.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"EvalEnvInstanceURIs": "http://localhost:4444/",
"JsonBodyDestFilePath": "C:\\Users\\marko\\UnityProjects\\GeneralTrainingEnvironmentForMAS\\WebAPI\\RequestData\\jsonBody.json",
"ImagePath": "C:\\Users\\marko\\Documents\\FERI\\Projekti\\EARS\\out\\artifacts\\EARS_jar\\images\\",
"UnityGameFile": "GeneralTrainingPlatformForMAS.exe",
"UnityExeLocation": "C:\\Users\\marko\\UnityProjects\\GeneralTrainingEnvironmentForMAS\\Builds\\",
"UnityConfigDestFilePath": "C:\\Users\\marko\\UnityProjects\\GeneralTrainingEnvironmentForMAS\\Builds\\GeneralTrainingPlatformForMAS_Data\\conf.json",
"Configurations": [
{
"Name": "Config1",
"EARSConfiguration": {
"AlgorithmType": 1,
"ProblemName": "Robostrike_Random_1",
"FitnessEvaluations": 110,
"Generations": 0,
"PopSize": 10,
"CrossoverProb": 0.7,
"MutationProb": 0.04,
"NumOfTournaments": 4,
"MinTreeDepth": 5,
"MaxTreeStartDepth": 6,
"MaxTreeEndDepth": 12,
"MaxTreeSize": 100,
"ElitismProb": 0.05,
"SeqSelNumOfChildren": 3,
"InitPopGeneratorMethod": "RampedHalfAndHalfMethod",
"Functions": "Sequencer,Selector,Inverter",
"Terminals": "sensors.RayHitObject,movement.MoveForward,movement.Rotate,robostrike.RotateTurret,robostrike.Shoot,robostrike.HealthLevelBellow,robostrike.ShieldLevelBellow,robostrike.AmmoLevelBellow",
"FeasibilityControlOperators": ["GPTreeExpansionOperator-{}","GPDepthBasedTreePruningOperator-{}"],
"BloatControlOperators": ["GPNodeCallFrequencyCountPruningOperator-{\"pruneThreshold\": 5, \"pruneProbability\": 0.1}"]
},
"UnityConfiguration": {
"AutoStart": true,
"ProblemDomain": "Robostrike",
"StartURI": "http://localhost:4444/",
"BtSource": "C:\\Users\\marko\\UnityProjects\\GeneralTrainingEnvironmentForMAS\\GeneralTrainingEnvironmentForMAS\\Assets\\Resources\\CollectorBts\\",
"TimeScale": 5,
"FixedTimeStep": 0.04,
"RerunTimes": 1,
"InitialSeed": 123,
"Render": false,
"RandomSeedMode": 1,
"SimulationSteps": 3500,
"SimulationTime": 0,
"GameScenarios": [
{"GameSceneName": "RobostrikeGameScene1"},
{"GameSceneName": "RobostrikeGameScene2"},
{"GameSceneName": "RobostrikeGameScene3"}
],
"AgentScenarios": [
{
"AgentSceneName": "RobostrikeAgentScene1",
"BTLoadMode": 0,
"GameScenarios": [
{"GameSceneName": "RobostrikeGameScene1"}
]
}
],
"ProblemConfiguration":
{
"ArenaSizeX": 100,
"ArenaSizeZ": 100,
"ArenaOffset": 4.0,
"GameMode": 0,
"AgentMoveSpeed": 10,
"AgentRotationSpeed": 150,
"AgentTurrentRotationSpeed": 1,
"DestroyMissileAfter": 1,
"MissileShootCooldown": 1,
"MissleLaunchSpeed": 15,
"MissileDamage": 2,
"AgentStartHealth": 10,
"AgentStartShield": 0,
"AgentStartAmmo": 0,
"GameScenarioType": 1,
"AgentRespawnType": 0,
"HealthPowerUpValue": 5,
"ShieldPowerUpValue": 5,
"AmmoPowerUpValue": 10,
"MaxHealth": 10,
"MaxShield": 10,
"MaxAmmo": 20,
"MinPowerUpDistance": 8,
"HealthBoxSpawnAmount": 1,
"ShieldBoxSpawnAmount": 1,
"AmmoBoxSpawnAmount": 2,
"AgentMoveFitnessUpdateInterval": 4,
"AgentMoveFitnessMinDistance": 2,
"AgentAimFitnessUpdateInterval": 5,
"AgentNearWallUpdateInterval": 5
},
"FitnessValues":
{
"MissileHitAgent": -5,
"AgentHitByRocket": 5,
"MissileMissedAgent": 0.5,
"SurvivalBonus": -50,
"LastSurvivalBonus": -30,
"DeathPenalty": 20,
"AgentDestroyedBonus": -25,
"AgentExploredSector": -0.5,
"AgentReExploredSector": -0.05,
"AgentAimingOpponent": -1,
"AgentFiredMissile": -1,
"AgentNearWall": 1,
"AgentPickedUpHealthBoxPowerUp": -2,
"AgentPickedUpShieldBoxPowerUp": -2,
"AgentPickedUpAmmoBoxPowerUp": -4
}
}
}
]
}
Binary file added out/production/EARS.main/GRADIENT_BLACK_TO_WHITE.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added out/production/EARS.main/GRADIENT_BLUE_TO_RED.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added out/production/EARS.main/GRADIENT_HEAT.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added out/production/EARS.main/GRADIENT_HOT.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added out/production/EARS.main/GRADIENT_MAROON_TO_GOLD.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added out/production/EARS.main/GRADIENT_PARULA.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added out/production/EARS.main/GRADIENT_RAINBOW.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added out/production/EARS.main/GRADIENT_RED_TO_GREEN.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added out/production/EARS.main/GRADIENT_ROY.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added out/production/EARS.main/GRADIENT_VIRIDIS.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions out/production/EARS.main/LennardJonesOptima.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions out/production/EARS.main/TE1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
4.000000 75.24000
5.000000 79.55000
6.000000 85.91000
7.000000 94.45000
8.000000 105.6400
9.000000 115.6800
10.00000 123.8200
11.00000 136.4200
12.00000 145.4300
13.00000 154.3000
14.00000 161.0500
15.00000 167.2000
10 changes: 10 additions & 0 deletions out/production/EARS.main/TE2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
1 214
3 256
5 273
10 307
15 284
20 250
30 225
50 210
80 186

18 changes: 18 additions & 0 deletions out/production/EARS.main/TE3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
1.5 30.2
2.0 29.7
2.5 30.0
3.0 29.0
3.5 28.9
4.0 28.8
4.5 28.8
5.0 27.6
5.5 27.4
6.0 28.2
8.0 27.0
10.0 24.0
13.0 18.9
16.0 17.5
20.0 13.0
25.0 10.0
32.0 7.8
40.0 7.1
100 changes: 100 additions & 0 deletions out/production/EARS.main/W2D_100.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
1 0
0 1
0.500004 0.499996
0.250003 0.749997
0.749997 0.250003
0.375004 0.624996
0.874989 0.125011
0.624995 0.375005
0.125019 0.874981
0.0625134 0.937487
0.937495 0.0625046
0.437502 0.562498
0.312498 0.687502
0.687503 0.312497
0.562504 0.437496
0.187523 0.812477
0.812456 0.187544
0.843721 0.156279
0.343752 0.656248
0.156271 0.843729
0.656246 0.343754
0.468754 0.531246
0.531253 0.468747
0.0937707 0.906229
0.406252 0.593748
0.0312462 0.968754
0.718752 0.281248
0.96876 0.0312402
0.593744 0.406256
0.906258 0.0937423
0.281262 0.718738
0.21879 0.78121
0.78125 0.21875
0.203155 0.796845
0.0468772 0.953123
0.953125 0.0468752
0.671874 0.328126
0.859362 0.140638
0.890616 0.109384
0.359378 0.640622
0.546879 0.453121
0.390628 0.609372
0.609368 0.390632
0.703127 0.296873
0.828079 0.171921
0.265625 0.734375
0.42188 0.57812
0.0781359 0.921864
0.453133 0.546867
0.734377 0.265623
0.515633 0.484367
0.640626 0.359374
0.984379 0.0156213
0.328117 0.671883
0.921877 0.0781225
0.484386 0.515614
0.296881 0.703119
0.0156159 0.984384
0.765634 0.234366
0.109404 0.890596
0.140655 0.859345
0.578134 0.421866
0.171879 0.828121
0.234403 0.765597
0.796849 0.203151
0.179699 0.820301
0.89844 0.10156
0.273445 0.726555
0.476571 0.523429
0.445318 0.554682
0.21097 0.78903
0.757819 0.242181
0.335937 0.664063
0.632809 0.367191
0.507819 0.492181
0.835892 0.164108
0.867177 0.132823
0.195342 0.804658
0.367191 0.632809
0.0547015 0.945299
0.351566 0.648434
0.664058 0.335942
0.539068 0.460932
0.398439 0.601561
0.554691 0.445309
0.382815 0.617185
0.820267 0.179733
0.945306 0.0546935
0.601555 0.398445
0.414069 0.585931
0.726566 0.273434
0.257815 0.742185
0.0390672 0.960933
0.96095 0.0390502
0.132846 0.867154
0.695312 0.304688
0.523444 0.476556
0.320307 0.679693
0.679683 0.320317
0.460941 0.539059
Loading