yvsarkisyan / keeperfx

Automatically exported from code.google.com/p/keeperfx
0 stars 0 forks source link

Computer player must use doors to make rooms more efficient #481

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When the computer player has enough gold and a workshop, he does place some 
doors, but he does so seemingly random.
The computer player would become better if he would place the rooms in such a 
way to make his rooms more efficient.

Original issue reported on code.google.com by Loobinex on 1 Jan 2015 at 10:30

GoogleCodeExporter commented 9 years ago

Original comment by Loobinex on 3 Jan 2015 at 2:15

GoogleCodeExporter commented 9 years ago
I don't think I understand the issue. Do you have any demonstration of that?

Original comment by mefistotelis on 4 Jan 2015 at 12:07

GoogleCodeExporter commented 9 years ago
The way it builds rooms should be changed then too. 

It often makes rooms with 2 tile corridors between them. You would think it 
does that so it can make the room bigger later on (Like in DK2) but it never 
does that. so it's a bit useless to do that then.

To be more on topic,

I do think it would make sense that the AI only places the strongest doors 
available. (or upgrade them a long the way) At least the most toughest AI 
should do that. 
Now it would just place doors that are available and mostly those are wooden 
and braced doors when they all are available. 

Original comment by Krizzi...@gmail.com on 4 Jan 2015 at 12:55

GoogleCodeExporter commented 9 years ago
Quite simple really. See attached screenshot I just made. I gave blue enough 
gold to never sell traps/doors and waited a lot of paydays.

Notice he build quite a few doors, but raised not a single room to maximum 
efficiency. Door placement seems random to me, a human player would never place 
them like this.

If you have a reinforced room, placing a door on all exits boosts efficiency. 
That's what he should do. Look at the biggest room with fewest open exits and 
place a door on one of those exits, repeat. This way room efficiency is 
accomplished the quickest with least amount of doors.

Original comment by Loobinex on 4 Jan 2015 at 1:06

Attachments:

GoogleCodeExporter commented 9 years ago
Are you sure the places where not door was placed are just empty? didn't he had 
any traps as well?

Original comment by mefistotelis on 6 Jan 2015 at 9:34

GoogleCodeExporter commented 9 years ago
Modified the level to only have braced doors available, no other doors, no 
traps. See new screenshot.

Are you saying the CP should not be placing the doors at random?

Original comment by Loobinex on 6 Jan 2015 at 10:38

Attachments:

GoogleCodeExporter commented 9 years ago
There are specific rules of where computer player places doors. The order of 
placing is random, but the amount of places being checked it limited and 
definitely not random.

Simplified rules:
- Place doors at four sides of rooms
- Do not place two doors just next to each other

Original comment by mefistotelis on 7 Jan 2015 at 6:21

GoogleCodeExporter commented 9 years ago
OK.

Being fully random is not efficient,... you need all exits doored-up to get to 
maximum efficiency, when you have many rooms it could take a long time before 
you randomly fill all exits.

The rule to not place two doors next to each other conflicts with the fact that 
the CP often makes hallways of 2 tiles between two rooms, causing at least one 
of the rooms to never reach maximum efficiency. Given that rooms can have up to 
4 neighboring rooms in combination with the random placement; this could 
significantly affect the amount of rooms that reach maximum efficiency. In 
fact, it is rare to see it at all.

Original comment by Loobinex on 7 Jan 2015 at 10:17

GoogleCodeExporter commented 9 years ago
And not forgetting that it will place traps on door "spots" as well. 

Original comment by Krizzi...@gmail.com on 7 Jan 2015 at 6:50

GoogleCodeExporter commented 9 years ago

Original comment by eatpajdi...@gmail.com on 30 Apr 2015 at 5:32