Ticket #888 (closed defect: fixed)
AI speed has decreased
| Reported by: | k776 | Owned by: | Jubal |
|---|---|---|---|
| Priority: | Release Blocker | Milestone: | Alpha 6 |
| Component: | Core engine | Keywords: | |
| Cc: | Jubal |
Description
The AI is slower in Alpha 6 than it was in the previous release. We need to really optimize this.
One AI on a map is unbearably slow as it progresses. The game should be able to easily cope with 8 AI (standard "big" game).
Work out ways to increase the AI speed and implement them.
Change History
comment:1 Changed 2 years ago by k776
- Summary changed from Increase AI speed to AI speed has decreased
comment:2 Changed 2 years ago by kenny
- Cc jubal added
- Owner set to jubal
Hi Jubal, it looks like the idle villager processing is part of what is making things really slow in the new AI. In my testing I had idle villagers standing idle near the top edge of the map. I think what is happening is that they are tasked with building, but then the foundation is never placed because there is some issue and therefore the villagers are idle and then the cycle repeats over and over.
Also take a look at economy.js around line 444:
gameState.getOwnEntities().forEach(function(centre) {
if (centre.hasClass("CivCentre?")) {
var centrePosition = centre.position(); var distcheck = VectorDistance?(supply.position, centrePosition); Skip targets that are far too far away (e.g. in the enemy base) if (distcheck > 600)
return;
}
});
I don't think the code is doing what you desire in this case. In any case it is unclear what you are trying to accomplish here.
comment:3 Changed 2 years ago by kenny
I didn't want to make changes without consulting with you and giving you an opportunity to look at if first ;-)
comment:4 Changed 2 years ago by kenny
- Cc Jubal added; jubal removed
- Owner changed from jubal to Jubal
comment:5 Changed 2 years ago by k776
- Status changed from new to closed
- Resolution set to fixed
I've been told that the AI speed is back to tolerable levels.
I think we might need a few people to tag team and develop an AI that is not only really good, but also super quick. The game should be able to support 8 AI without a noticeable performance hit, but doesn't at the moment.
I'm closing this ticket for now though.
