You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 17, 2018. It is now read-only.
There's a tiny problem with the current build that's only an issue when you're focusing on leveling up.
Since the code focuses on selecting planets with the highest progress, you end up on worlds where all the high threat (and eventually the middle threat) tiles have been used up, while planets that still have those tiles available are still available.
I messed around with the GetBestPlanet function, so that it selected the planet with the lowest progress. Here's what I did:
`
const GetBestPlanet = function GetBestPlanet() {
let bestPlanet;
let worstPlanet;
let maxProgress = 0;
let worstProgress = Number.MAX_VALUE;
if (!GAME.m_State.m_mapPlanets)
return;
for (let planetKV of GAME.m_State.m_mapPlanets) {
let planet = planetKV[1];
if(planet.state.active && !planet.state.captured && planet.state.capture_progress > maxProgress) {
maxProgress = planet.state.capture_progress;
bestPlanet = planet;
}
if(planet.state.capture_progress < worstProgress) {
worstProgress = planet.state.capture_progress;
worstPlanet = planet;
}
}
if (worstPlanet) {
console.log(`selecting planet ${worstPlanet.state.name} with progress: ${worstPlanet.state.capture_progress}`);
return worstPlanet.id;
}
/*if(bestPlanet) {
console.log(`selecting planet ${bestPlanet.state.name} with progress: ${bestPlanet.state.capture_progress}`);
return bestPlanet.id;
}*/
}
`
This works for me as the bot is now selecting the least progressed planet.
I'm wondering now if this should be added, where the bot priorities low progress planets, while player is still leveling up.
The text was updated successfully, but these errors were encountered:
GetBestPlanet only runs once so it's not exactly the best place to choose this, but if you want to try and find other planets before selecting a zone you can try that as well, but you would need a state to track them.
There's a tiny problem with the current build that's only an issue when you're focusing on leveling up.
Since the code focuses on selecting planets with the highest progress, you end up on worlds where all the high threat (and eventually the middle threat) tiles have been used up, while planets that still have those tiles available are still available.
I messed around with the GetBestPlanet function, so that it selected the planet with the lowest progress. Here's what I did:
`
const GetBestPlanet = function GetBestPlanet() {
let bestPlanet;
let worstPlanet;
let maxProgress = 0;
let worstProgress = Number.MAX_VALUE;
}
`
This works for me as the bot is now selecting the least progressed planet.
I'm wondering now if this should be added, where the bot priorities low progress planets, while player is still leveling up.
The text was updated successfully, but these errors were encountered: