MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001918VCMIAI - Adventure Mappublic2014-10-11 16:022022-04-12 09:17
Reporterlinuxrocks123 
Assigned ToWarmonger 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version0.96b 
Target VersionFixed in Version0.97b 
Summary0001918: AI Overconfident About Creature Banks
DescriptionThe AI repeatedly dies at creature banks because it thinks they have zero difficulty. This appears to be due to a change in the JSON format. The attached patch fixes the issue. This may be a duplicate of issue 1850, but I have reproduced it in the latest git.
TagsNo tags attached.
Attached Filespatch file icon fuzzy.patch [^] (2,835 bytes) 2014-10-11 16:02 [Show Content]
patch file icon fuzzy2.patch [^] (2,829 bytes) 2014-10-12 00:48 [Show Content]

- Relationships
duplicate of 0002145closedWarmonger ai not using threat assesment and just attacks everything in sight regardless on relative army strength 
related to 0002060closedIvan After loading game FuzzyHelper::estimateBankDanger not work properly 

-  Notes
(0005013)
linuxrocks123 (developer)
2014-10-11 16:04

Oh, the "getTacticalAdvantage" change isn't related to this bug I don't think. But I still think it's a valid fix.
(0005014)
Warmonger (administrator)
2014-10-11 19:51
edited on: 2014-10-11 19:52

I don't think these changes are corrected. For example, evaluate(GatherArmy) is normalized by 1000 to keep it withing resonable limits. It's arbitrary formula, but more or less works. With fuzzy logic all that matters are proportions.

Adding false assertions before executable code makes no sense, either.

Expected combat value is now calculated using center-of-mass formula, but I did it just for test. May be confusing and not needed, but still gives a bit different results if you think about it ;)

(0005015)
linuxrocks123 (developer)
2014-10-12 00:58

I uploaded a new version of the patch. I was off by a factor of 100 with the expectedCombatValue() calculation. I was calculating percents and so was multiplying by 0.01 to normalize, but it appears that was not correct. That's fixed now.

Warmonger:
- Re evaluate(GatherArmy): This part of the patch is trying to get the AI to gather armies more, since he's not doing it enough. I found the problem was elsewhere, but kept that in since I still thought it was a bug. If you think it's not, you're probably right, remove that part of the patch before applying. My fix for the AI gathering armies added a new goal "DefendTown", among other changes. I'll be uploading it soon, but I'm going to play against the AI to test (this will be the most enjoyable testing I've done in a while :).
- Re false assertions: minGuards() and maxGuards() are broken and always returning 0 because it appears they're expecting JSON tags which do not exist to be in the mapObjects config. The functions need to be deleted, but I put assert(0) in there to make sure no one else was using them before I did that.
(0005214)
Warmonger (administrator)
2014-12-19 19:31

Most likely fixed in https://github.com/vcmi/vcmi/commit/df8289eee4c41183ac345509994dad35970e6412 [^]

- Issue History
Date Modified Username Field Change
2014-10-11 16:02 linuxrocks123 New Issue
2014-10-11 16:02 linuxrocks123 Status new => assigned
2014-10-11 16:02 linuxrocks123 Assigned To => Tow
2014-10-11 16:02 linuxrocks123 File Added: fuzzy.patch
2014-10-11 16:04 linuxrocks123 Note Added: 0005013
2014-10-11 19:51 Warmonger Note Added: 0005014
2014-10-11 19:52 Warmonger Note Edited: 0005014 View Revisions
2014-10-12 00:48 linuxrocks123 File Added: fuzzy2.patch
2014-10-12 00:58 linuxrocks123 Note Added: 0005015
2014-12-19 19:31 Warmonger Note Added: 0005214
2014-12-19 19:31 Warmonger Status assigned => resolved
2014-12-19 19:31 Warmonger Fixed in Version => 0.97b
2014-12-19 19:31 Warmonger Resolution open => fixed
2014-12-19 19:31 Warmonger Assigned To Tow => Warmonger
2015-02-10 10:10 AVS Relationship added related to 0002060
2015-03-25 09:29 Warmonger Relationship added duplicate of 0002145
2022-04-12 09:17 Povelitel Status resolved => closed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean