-
Notifications
You must be signed in to change notification settings - Fork 219
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
Ch 2 - Performance measures #130
Comments
Sure, that could be cool. Here's a reproducible seeded RNG if you need one: function makeRand(seed) {
const multiplier = 47271;
const wrap = 0x7FFFFFFF;
seed = seed % wrap;
if (typeof seed != 'number' || !(seed > 0)) throw "check seed to makeRandInt";
return function() {
seed = seed * multiplier % wrap;
return seed;
};
}
function makeRandInt(seed) {
let generator = makeRand(seed);
return (N) => generator() % N;
} You may also find some ideas useful from Ladder of Abstraction |
Thanks, I'll start working upon the idea. |
I am facing a little problem while implementing agent2, i want to the agent2 to run for a while, then stop for a time period and then run again continuing this cycle. |
The way the agents are programmed now may not be flexible enough for what you want. Feel free to implement them in a different way to make your diagram work. The implementation does not have to match the book's examples (the book's pseudocode is not designed with visualizations in mind). |
Hi , I had worked upon this visualization. The code works as desired. but as you pointed out here is a design doc for the same. @redblobgames @samuelgoto Please review. |
TODO: dirty/clean should be controlled automatically, reproducible using seeded RNG, and then display a line chart with the performance measure.
We can add the following feature by creating 2 types of agents:
1.) agent that moves continuously but takes up more time to clean
2.) agent that stops after regular intervals but takes less time to clean
We can either use a 1x2 floor or 2x2 floor to make the problem more complex.
Things to be decided before implementing:-
1.)Points awarded for each successful clean
2.)Points deducted for each extra moment
3.)Points deducted on the basis for the time the floor is dirty (a negative factor to agent 2)
The performance will be shown as a line chart of scores v/s time where scores measure the performance of the agent.
To make it more interactive and intuitive, the feature of setting the stop-interval and the cleaning-interval
to show various performances.
@redblobgames Would it be useful to implement it?
Would like to work on it: Yes.
The text was updated successfully, but these errors were encountered: