deestar12 / keeperfx

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

[AI Keeper] - Sells doors/traps unnecessarily #434

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Load a map where the AI begins with a decent amount of gold (i.e. 10k) and 
any amount of doors.

2. Observe as the AI sells their doors within the first minute.

What is the expected output? What do you see instead?

The AI Keeper should value their doors and only resort to selling them if 
absolutely necessary. Instead, the AI sells their doors despite having nearby 
gold or gem blocks to dig to.

On maps that rely on the AI maintaining a locked door, playability is reduced 
to near 0.

What version of the product are you using? On what operating system?

Windows 7 64-bit
KeeperFX 0.4.5 r1481

Please provide any additional information below.

If this cannot be fixed via logic alone, I can think of an alternative:

. Create a new piece of code for map makers that prevents the AI from selling 
their doors until a specified time or event.

Original issue reported on code.google.com by KeeplarBooger on 28 Nov 2014 at 3:36

GoogleCodeExporter commented 8 years ago
Computer player shouldn't be able to sell locked doors, only the ones which 
weren't locked at start.

If you see computer player selling locked door, please provide a means of 
reproduction - saved game or map which demonstrates the issue.

Original comment by mefistotelis on 28 Nov 2014 at 6:06

GoogleCodeExporter commented 8 years ago
My bad, I experienced the Adikted glitch where locked doors will sometimes show 
without a key (if you place adjacent doors in Adikted this happens).

It is frustrating when you want an unlocked door at the entrance to an AI base 
however. I have created a level where the AI start with 30k gold and many gold 
blocks near their bases, as well as a gem within their base. Regardless, the AI 
will sell their doors within the first 5 minutes of the game.

Original comment by KeeplarBooger on 29 Nov 2014 at 1:27

GoogleCodeExporter commented 8 years ago
Yes, computer player will sell unlocked doors as soon as it gets out of money. 
This usually allows him to keep the treasury full.

Computer player can often spend quite a lot of gold quickly when building a 
room, so he often gets out of money and starts the "out of money tasks" 
(picking creatures from rooms which take gold, picking gold on ground to 
treasury, selling traps and doors). He will, however, try to rebuild the traps 
and doors when they're manufactured.

Original comment by mefistotelis on 29 Nov 2014 at 5:53

GoogleCodeExporter commented 8 years ago
Shouldn't the AI prioritize dig-to-close gold if that is available?

Original comment by Loobinex on 29 Nov 2014 at 7:27

GoogleCodeExporter commented 8 years ago
When computer player has little gold, he will use dig-for-gold tasks. The 
selling behaviour is for the situation where player is broke, like cannot 
maintain current expenses. He will also pick up gold pots and drop them into 
treasury.

Digging to gold sometimes gives poor results even if it didn't failed (ie. when 
there are enemies on the way, or if the player has limited imps). It may also 
be very slow. This is why computer player needs to be able to use both digging 
and selling at the same time.

Original comment by mefistotelis on 19 Mar 2015 at 11:18

GoogleCodeExporter commented 8 years ago
Aren't there multiple priority levels? Say:

<3 paydays - Dig to close gold
<1.5 paydays - Dig for greedy gold + sell traps/doors

Original comment by Loobinex on 19 Mar 2015 at 11:26

GoogleCodeExporter commented 8 years ago
There are multiple conditions, different for various tasks.

There are checks: "check for gold", "check for payday", and various processes 
like "dig for close gold" or "dig for greedy gold". Every of these is working 
independently, and has different parameters - like trigger conditions, 
cooldown, priority.
Still, they can affect each other - ie. "check for gold" often increases 
priority of all "dig for gold" processes.

To conclude, this is quite complex.

But back t the original issue - it might be a good idea to make a script 
command to disallow computer player selling placed traps and doors.

Original comment by mefistotelis on 3 Apr 2015 at 9:27

GoogleCodeExporter commented 8 years ago
I think the issue is more about the CP selling traps/doors when it is not 
needed because there is plenty of gold(available to dig).
Selling traps/doors should be a last resort, but disabling it also has adverse 
effects so I would advise against investing time in a script command to disable 
selling doors/traps.

Original comment by Loobinex on 5 Apr 2015 at 4:26

GoogleCodeExporter commented 8 years ago

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