Giter Club home page Giter Club logo

the-international-open-source's People

Contributors

aerics84 avatar allorrian avatar araele avatar carsonburke avatar daschechtman avatar defaulto avatar illuminatiscreeps avatar joshwegener avatar lokenwow avatar maxsupermanhd avatar morningtea7 avatar officialaudite avatar pieterbrandsen avatar plaidrabbit avatar realacesu avatar schealex avatar shanemadden avatar shup1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

the-international-open-source's Issues

Improve safemode activation requirements

Things to consider when improving code:

  • Should probably only safemode when a spawn is at risk.
  • Spawns are probably not at risk if there is a sufficiently HP rampart on top of them
  • Spawns can be killed in one hit by sufficiently fitted dismantle creeps, so checking if spawn hits are low isn't a good idea
  • Perhaps check enemy range to spawn and spawn rampart existence for each spawn each tick

Restructure sourceHarvestPositions to optimize memory and usage

sourceHarvestPositions should be stored in memory in the following structure

sourceHarvestPositions = [
packedSourcePositions // one packed array of positions (sorted by range to source path)
]

There should be a room getter to enable easy access to the harvest positions. The result should be:

sourceHarvestPositions = [
[RoomPosition] // one array of unpacked room positions in previous sort order per source
]

TypeError: Cannot read property 'source1RemoteHarvester' of undefined

An error occured while upgrading to latest version

Error:
TypeError: Cannot read property 'source1RemoteHarvester' of undefined at RemoteHarvester.preTickManager (main:1269:61) at InternationalManager.creepOrganizer (main:1342:15) at InternationalManager.run (main:962:10) at Object.loop (main:9166:26) at __mainLoop:1:52 at __mainLoop:2:3 at Object.exports.evalCode (<runtime>:15845:76) at Object.exports.run (<runtime>:46468:24)

Harvester looks in commune.creepsFromRoomWithRemote for its remote name but it could not be found because that room isn't being remote mined currently

Code:
`RemoteHarvester.prototype.preTickManager = function () {
if (!this.memory.remoteName) return

 const role = this.memory.role as 'source1RemoteHarvester' | 'source2RemoteHarvester'

 // Reduce remote need
 customLog('REMOTE HARVESTER CHECK', JSON.stringify(this.parts))
 Memory.rooms[this.memory.remoteName].needs[remoteNeedsIndex[role]] -= this.parts.work

 const commune = Game.rooms[this.memory.communeName]
 if (!commune) return

 // Add the creep to creepsFromRoomWithRemote relative to its remote

 console.log(commune.name, commune.creepsFromRoomWithRemote[this.memory.remoteName], this.memory.remoteName)
 commune.creepsFromRoomWithRemote[this.memory.remoteName][role].push(this.name)

}`

Logs: E72N6 undefined E72N5

*This was fixed by resetting memory using CleanMemory

Stop remoteHauler exit bouncing

image

Likely the result of haulers trying to path to a Coord that they think is in their room, but is actually in the commune room they are bouncing into. Unkown specific fix

Doesn't work in training

TypeError: Cannot read properties of undefined (reading 'x') at basePlanner:1847:41 at manageBasePlanning:1968:48 at constructionManager:1964:5 at Object.communeManager [as commune]:2130:5 at roomManager:2994:51 at Object.loop:3040:5 at __mainLoop:1:22694 at eval:2:4
Constantly getting this error on spawn in training. Unsure about in a actual server if error persists. This error starts instantly after start. It managed to place one construction site down before.

Node v12.22.10 used to compile, not sure if that effects anything.

Edit: nvm im stupid, ignore me please uwu
Edit2: Your scouts are still dumb tho

Optimize CPU heavy international functions

As you can see, the tickConfig and creepOrganizer take a lot of CPU while performing (I think) no intents. Therefore, there are lots of CPU optimizations we can make to these functions!

image
image

Wrong comment or maths

/src/room/linkFunctions.ts

Either comment or maths is wrong.
Comment suggests half but maths of *0.25 is quarter.

lines 25 || 27

`
// If the link is more than half full, iterate

        if (receiverLink.store.energy > receiverLink.store.getCapacity(RESOURCE_ENERGY) * 0.25) continue

`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.