-
Notifications
You must be signed in to change notification settings - Fork 155
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
[WIP] Some useless calculations #294
base: master
Are you sure you want to change the base?
Conversation
democratic collaboration Please review the PR to help. |
in near future may be useful for handling carry size |
lack of visibility is a problem for real usage. caching possible paths on scout visit may solve it |
Adding WIP label, the title is prefixed with [WIP] |
route.splice(0, 0, {room: startRoom}); | ||
for (let routePos = 0; routePos < route.length; ++routePos) { | ||
yield* Game.rooms[route[routePos].room].getPath(route, routePos, startId, targetId, false); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
me to, can we cherry pick?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feel free)
Would like to jump in here for some discussion about sourcer and carry optimization. So looking only from the sourcer perspective, let's assume: So
Maybe even adapt the What do you think? |
In theory, it should. But what Also it is hard for me to model influence of sharing the paths. I'm not sure it will have huge effect. In my point of view, it would be better for each sourcer to call creeps of exact size and quantity, that is needed, depending on distance to base. Also in than case carries do not have to transfer energy to carries with different target. But I have no clue in which point of time sourcers should call such carries, and how to take into account if sourcer already have some stack of energy under himself. |
Regarding What prevents me from exact calculations is mostly the CPU limit, the dynamic world and the tick based. I would like to improve a bit more in the mentioned direction. I'm also fine with more sophisticated system, like the one you mentioned and started, maybe have a feature flag, so that we can test and compare. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- i like the idea of a 'config_brain_calculations.js' were we could extract heavy calculations and memorise them in some way.
- i think for the carries (non helpers) on RCL 8 are those 11M/11C/1W totally okay, they're not so CPU intensive, but effective.
- i did some measure on 'creep.handle': creeps roles cpu usage vs count of execution from highest to lowest scout (>3), carry (>0,4), sourcer (>0,4), harvester (>0,5)
i hope this helps to focus
BTW please if you adding console.log outputs change to console.log(Game.time, ) or if object specific use this.log on that object e.g. object.log();
route.splice(0, 0, {room: startRoom}); | ||
for (let routePos = 0; routePos < route.length; ++routePos) { | ||
yield* Game.rooms[route[routePos].room].getPath(route, routePos, startId, targetId, false); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
me to, can we cherry pick?
No description provided.