Opened 13 years ago

Closed 13 years ago

#888 closed defect (fixed)

AI speed has decreased

Reported by: Kieran P Owned by: James Baillie
Priority: Release Blocker Milestone: Alpha 6
Component: Core engine Keywords:
Cc: James Baillie Patch:

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 (5)

comment:1 by Kieran P, 13 years ago

Summary: Increase AI speedAI speed has decreased

comment:2 by Kenny Long, 13 years ago

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 by Kenny Long, 13 years ago

I didn't want to make changes without consulting with you and giving you an opportunity to look at if first ;-)

comment:4 by Kenny Long, 13 years ago

Cc: James Baillie added; jubal removed
Owner: changed from jubal to James Baillie

comment:5 by Kieran P, 13 years ago

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.