the-international-screeps-bot / the-international-open-source Goto Github PK
View Code? Open in Web Editor NEWAn automated bot for the coding game Screeps.com
License: MIT License
An automated bot for the coding game Screeps.com
License: MIT License
For example, at low RCL and closed off sources, haulers will be over-spawned relative to the actual income from the source
Builders should be spawned with more work and carry and less move. They should wait for haulers to come to them and not move.
Additionally, have upgraders use the controllerLink even when there is no hubLink.
This improvement requires the pre-requisite of hauler reservation instead of tasks.
Things to consider when improving code:
/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
`
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
MFR (madeForRoads) memory property applied to creeps that should weight roads in costMatrix pathing
At low RCL when there is no sourceContainer, sourceHarvesters should have their carry capacity used for reservations by haulers to avoid energy decay from it being dropped on the ground
If a scout finds a room it wants to sign but a reserver is there that "unsigns" it immedietly the scout will get caught in a loop of signing every 2 ticks.
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
Have a method in the InternationalManager that identifies the best new claimRequest for all communes and submits it
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
]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.