#Greedy algo improvements
35 messages · Page 1 of 1 (latest)
probably because file attached
same question
step 1: rewrite it in rust
Yea, I was thinking that but I only know python somewhat, so I was thinking to write it in python and ask chatgpt to rewrite it once the logic is down
No choice if I want it faster.. I don't know rust 😒
Learn Rust 🗣️
also step 1.8: parallelize that thing properly with multiprocessing, a decent chunk of that code could be ran in parallel
The issue isnt the program taking long, I realise now when I said runtime is too high it might be confusing but I meant run time from the file names(the attacks its choosing)
For example when choosing 93% coverage, its giving me 1000 attack chains(that only reach 91%) that takes 100days. When I know that I can achieve 93% in under 4 hours from figuring it out manually
So the entire algorithm is trash? lmao
!rule solicitation
🗣️
Fair enough
I don't even get how that algorithm is supposed to work
Basically it goes through all plains in all files in setA folder. Checks how long each file takes, divises some sort of plain coverage to time taken ratio and chooses the best one. Then it looks at all the files again and finds plains that arnt in the first one, does the ratio and selects the best one, and so on.
"How long each file takes" how's the runtime relevant to the algo?
We are looking for the shortest runtime that achieves a certain coverage
by runtime we mean the seconds int taken from the file names
So not actually runtime of our code lol just a property of that file
yea exactly
Once it tips over or reaches plains needed, we stop
but yes, often it doesnt reach
because it chooses bad attack paths
Erm, na..