Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. Jerdaz
    3. Topics
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    Topics created by Jerdaz

    • Unsolved cpu.getUsed() negative result?
      Technical Issues and Bugs • • Jerdaz

      3
      3
      Posts
      4045
      Views

      It's in this code: https://github.com/jerdaz/FormicAI/blob/main/src/meta_operation.js Every class ending with 'Op', including MainOp extends this class, so it is called 100's of times each tick. The variable is stored locally in the function. It happens only once every few hours so it happens only once every 1.000.000 calls or so and only one random operation is affected. It happens in different child classes (CreepOp, AttackOp, BuildingOp, HarvestingOp etc) and if it happens I only see one notification in the tick.
    • Unsolved CPU Assignment buggy
      Technical Issues and Bugs • • Jerdaz

      5
      5
      Posts
      6100
      Views

      Hi Nikolay, Thanks for the info. I've let it rest for some time but did another attempt at dynamic cpu assignment. I think the bug is triggered by assigning too much cpu to shard3 (more then 20). I tried cpu assignment again last night. This time with a 60/60/60/60 division. This triggered the bug again. Because of negative cpu on shard 0/2/3 my entire economy collapsed for 12 hours. This morning I added a manual code snippet that did a 200/10/10/20 assignment and it worked fine. My goal is to be able to colonize to current and future shards fully autonomously, without hardcoding constants about those shards. This doesn't seem possible at the moment. The reason I assign too much to shard 3 is: Currently I do not need more then 20 cpu per shard I haven't found a way to find the shard limit without hardcoding constants To fix it, I will have to adjust my code to: Add a max cpu constant for shard3 Disable colonization to shard4 and beyond