TooAngel / screeps

TooAngel NPC / bot / source code for screeps
https://screeps.com
GNU Affero General Public License v3.0
600 stars 154 forks source link

Bugfix nextroomers not being called and creep builder #620

Closed connorzg closed 3 years ago

connorzg commented 3 years ago

Have been playing with this bot for the last few days and noticed/fixed a couple bugs that popped up.

    if (!this.reviveMyNowHelperValid(helperRoom)) {
      continue;
    }
worlddrivenbot commented 3 years ago

This pull request will be automatically merged by worlddriven in 6 day(s) and 23 hour(s). The start date is based on the latest Commit date / Pull Request created date / (force) Push date. The time to merge is 5 days plus 5 days for each commit. Check the worlddriven status check or the dashboard for actual stats.

To speed up or delay the merge review the pull request:

  1. Files changed
  2. Review changes
worlddrivenbot commented 3 years ago

The branch of this pull request was updated so the auto-merge time has been reset.

It will be automatically merged by worlddriven in 6 day(s) and 23 hour(s). Check the worlddriven status check or the dashboard for actual stats.

worlddrivenbot commented 3 years ago

Thank you for the review. This pull request will be automatically merged by worlddriven in 3 day(s) and 1 hour(s). Current votes: 319/666.

Check the worlddriven status checks or the dashboard for actual stats.

connorzg commented 3 years ago

@TooAngel thanks for the fast review! I'm just starting to dip my toes in this project but see multiple areas that need work so I'm excited to be able to contribute. The next thing I've been working on personally and will likely PR is improvements to the auto-move of misplaced spawns, I have seen that kill out many colonies because the workers die before the new spawn is completed.

Increasing the number of planers and energy requirements has been a good first step but likely better would be to calculate the existing planners TTL and WORK components vs the work needed to build a spawn.

TooAngel commented 3 years ago

Cool, happy to hear that you like it and you are interested in contributing, welcome.

I'm wondering that replacement of the misplaced spawn leads to many problems, I tested in on multiple rooms. But it can definitely be improved. If you know a room where that happens we could include it in the tests.

I'm trying to find simple maybe not accurate solutions, so before calculating the exact amount, which I guess is even hard to calculate, I would try the just put noteworthy higher thresholds than expected.

But go ahead show us your ideas :-)

connorzg commented 3 years ago

@TooAngel I've been playing on a personal private server running my modified tooangel bot against some of the standard tooangel bots and have noticed close to half of the bots die out during the spawn reconstruction phase, though that could also be related to the nextroomers not being called (which this PR fixes!). I haven't checked out the tests you have in this repo yet so I'll see if that's something I can reproduce there.

That's a good point about complexity. This is the most cpu-constrained project I've worked on so I'll have to keep in mind simple is better, and try not to overengineer.

TooAngel commented 3 years ago

The misplaced spawn shouldn't have to do with the nextroomers. The misplaced spawn only occurs in the first room if the spawn does not match the room layout. In other rooms, the spawn is placed automatically. Nextroomers are only spawned for additional rooms.

I just sent a PR #621 to update the package version, this will automatically release the current version to npm and steam so that you can play against the newest one.

Private server is perfect, if you can post the room name and spawn position (if you still have them), I can have a look, too.

TooAngel commented 3 years ago

This pull request was merged by worlddriven.