SashaSaw / SAMOTA-Lib

MIT License
0 stars 0 forks source link

How will the fitness score be calculated? #6

Closed SashaSaw closed 7 months ago

SashaSaw commented 8 months ago

@donghwan-shin So at the moment i have added the necessary code from the cps-tool-competition to run the simulator with the random test generator but it only outputs whether the test has failed or succeeded which is boolean and im not sure how to make that into a fitness score. (this is considering that the objective that the car is trying to achieve is staying in the right lane). Have u got any ideas on how i can implement a fitness score formula and also should i have a fitness score formula as an input for calculateFitnessSim as it would allow the user to use thier own fitness score formula perhaps?

https://github.com/SashaSaw/SAMOTA-Lib/blob/62f291e8a36cf1a19d90849b3dae6832dc2ad2e7/src/FitnessCalculator.py#L8

donghwan-shin commented 8 months ago

Take a look at this code: https://github.com/ADS-Testing/cps-tool-competition/blob/main/sample_test_generators/one_test_generator.py#L66.

max(oob_percentage) is something you can directly use as a fitness score.

SashaSaw commented 7 months ago

Fitness Score has been implemented so the issue can be closed.