Improve estimation algorithm #6

Closed
opened 2025-01-24 01:21:20 +01:00 by sacha · 2 comments
Owner

At the moment estimation is really simple.

(int(solver.iter) - int(solver.counter)) / int(rate)

This can be improve by taking the average over time instead of whatever the current rate is and throw it against the progress as it is now.

Take the rate:

rate := int64(rate_diff) / int64(timer_elapsed.Seconds())

Store it in a slice:

solver.rates = append(solver.rates, rate)

Create an average of the rates (pseudo code):

sum(solver.rates)/len(solver.rates)

Then do the prediction:

(solver.iter - solver.counter) / solver.rates

🤔 Should give it some thought.

At the moment estimation is [really simple]([url](https://gitea.ligthert.net/golang/sudoku-funpark/src/branch/trunk/solver/processing.go#L141)). `(int(solver.iter) - int(solver.counter)) / int(rate)` This can be improve by taking the average over time instead of whatever the current rate is and throw it against the progress as it is now. Take the rate: > rate := int64(rate_diff) / int64(timer_elapsed.Seconds()) Store it in a slice: > solver.rates = append(solver.rates, rate) Create an average of the rates (pseudo code): > sum(solver.rates)/len(solver.rates) Then do the prediction: > (solver.iter - solver.counter) / solver.rates 🤔 Should give it some thought.
Author
Owner

The estimator works, but it turns out the loop is borked. Working on that.

The estimator works, but it turns out the loop is borked. Working on that.
Author
Owner

Implemented with 26b78420a2

Implemented with https://gitea.ligthert.net/golang/sudoku-funpark/commit/26b78420a25ffe546eb0baf1541f6cdc3066d976
sacha closed this issue 2025-01-25 14:35:21 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: golang/sudoku-funpark#6
No description provided.