1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
Commit Graph

35 Commits

Author SHA1 Message Date
DjWarmonger
d17b3a14bd - Significantly improved exploration algorithm
- Workaround to make AI gather army when exploration is not possible anymore
- Possibly fixed issue with AI not capturing guarded objects
2014-02-07 20:09:15 +00:00
DjWarmonger
a9b10c8099 - Changed aggregation method so now fuzzy engine takes all the factors into consideration
- Heroes now will use real path cost and their movement, which has numerous advantages:
* Actual movement cost is taken into consideration
* Groups of heroes will keep order
* Fastest heroes will be used for exploration first
2014-02-07 08:23:31 +00:00
DjWarmonger
54fbdfec5e - Finally fixed wander crash
- Smoothed values of terms to improve differentiation and stability
2014-02-06 06:05:45 +00:00
DjWarmonger
486cd4b001 - Fixed (common) issue when AI found neutral stacks infinitely strong
- Fixed non-fuzzy performance of some functions. Now AI really considers all options and uses multiple heroes, who don't spend their time wandering a lot.
2014-02-05 18:45:51 +00:00
beegee1
b8eddcd9a8 - Moved place bonus hero before normal random hero and starting hero placement -> same behaviour as in OH3
- Moved placing campaign heroes before random object generation -> same behaviour as in OH3
- Refactored pickHero into pickNextHeroType (hero generation sequence) and pickUnusedHeroTypeRandomly
- Added a SIGSEV violation handler to vcmiserver executable for logging stacktrace (for convenience only)
- Fixed Fuzzy.cpp and VCAI.h compilation on Clang
- Added a handleException function in addition to our macros (no use of macros, enables debugging support, does not re-throw, catches ...-case too)
2013-12-28 12:47:55 +00:00
DjWarmonger
9ec299931d - Fixed VisitHero goal. Now heroes can exchange armies again.
- AI should not get lazy in endgame.
- Removed unused code.
2013-12-27 13:20:40 +00:00
DjWarmonger
e5b011abe0 - Fixed heroes stalling. Locked heroes now try to decompose their goals exhaustively, which FINALLY works as intended.
- Fixed multiple issues with ClearWayTo goal.
2013-12-26 09:53:37 +00:00
DjWarmonger
603cbd8850 Experiment: goal values calculated by Fuzzy Helper will be stored in "priority" field and used in consecutive calculations. 2013-12-25 16:05:11 +00:00
DjWarmonger
aec04d920e Endless crusade against AI issues and loopholes!
- Fixed #1126
- ClearWayTo and GatherArmy goals will also consider multiple subgoals
- GatherArmy may include building dwellings in town (experimental)
2013-12-23 20:46:01 +00:00
DjWarmonger
473250e223 - Removed slow and buggy part of exploration code
- Various tweaks and performance improvements. remove_if on long vector is a bad idea.
2013-12-21 17:34:59 +00:00
DjWarmonger
bf3fe0e274 - Explore goal will also use fuzzy comparison
- Fixed AI afraid of town with Castle built: #1514, #1515, #1584
2013-12-20 16:49:51 +00:00
beegee1
68bdf71db6 - Fixed GCC compiler warnings
- Implemented move heroes to next scenario partially
2013-12-20 13:07:58 +00:00
DjWarmonger
6b3ca831c1 - Conquer goal will not use fuzzy logic as well. AI should play more aggresively.
- Removed unused code.
2013-12-20 13:01:44 +00:00
DjWarmonger
d085f8eee8 First implementation of fuzzy logic in VisitTile goal. 2013-12-20 09:43:12 +00:00
DjWarmonger
983c0496d0 Some work towards fuzzy goal comparison. 2013-12-19 20:21:21 +00:00
DjWarmonger
2f698acf98 Compile fix - template specialization is defined before generic template. 2013-11-30 07:52:08 +00:00
DjWarmonger
8be4ca03c8 Uncommented Fuzzy code. Please let me know if it compiles on other platforms. 2013-11-25 11:55:48 +00:00
DjWarmonger
cedb3ea82a Some more logging for goal completion.
Stub of fuzzy goal selection.
2013-11-24 08:21:51 +00:00
Ivan Savenko
ee6cdbeffe went through the rest of cppcheck warnings, mostly harmless 2013-11-07 12:48:41 +00:00
Ivan Savenko
f82122d9be second part of c++11 update. gcc 4.5 and VS 2010 are no longer supported
- BOOST_FOREACH -> for
- replaced several boost classes with std (e.g. unordered)
- removed gcc-4.5 workarounds
- ran clang c++11 migration tool to detect some cases:
- - pointer initialized with "0" to nullptr
- - replace for with iterators with range-based for
- - use auto in some situations (type name specified twice, avoid long iterators type names)
2013-06-29 13:05:48 +00:00
beegee1
abf96a5b66 - Integrated the logging API into the AI subprojects - Added macros for tracing the control flow - Added methods isDebug/TraceEnabled for performance-critical sections 2013-04-10 16:28:14 +00:00
Ivan Savenko
a138db7c9e - removed lib headers from PCH
- fixed #1062
- correct terrain penalty check
2012-09-06 10:39:48 +00:00
Michał W. Urbańczyk
838c226a31 Compile fix. 2012-08-30 15:37:43 +00:00
Ivan Savenko
faaf799d95 - fixed some extra warnings. Mostly harmless.
NOTE: Please check changes in BattleState.cpp and GameHandler.cpp for possible bugs
2012-05-28 19:29:32 +00:00
Ivan Savenko
f2f39f1497 - makefiles for fuzzylite (#911)
- fixes for gcc compilation
- fixed #908
2012-03-12 20:11:46 +00:00
Michał W. Urbańczyk
59681be0a4 Fixed #906. 2012-03-10 19:14:45 +00:00
Michał W. Urbańczyk
0ef1085555 Changes around FuzzyLite library based on patch by q4a.
http://forum.vcmi.eu/viewtopic.php?p=6592#6592
2012-03-06 16:28:32 +00:00
DjWarmonger
bdd71b4f38 AI can now use external dwellings.
AI will weekly revisit dwellings & mills.
2012-03-05 19:11:28 +00:00
Ivan Savenko
e7783479d2 - (linux) version bump
- compile fixes
2012-03-05 13:31:59 +00:00
DjWarmonger
1ea2f3d3bb Added fixed FuzzyLite library to sources. It compiles without additional settings under MVS2010 and should also compile with other tools (straightforward include structure).
Did not add it to project files to avoid mess.

Fixed NaN / infinity issues.
2012-03-05 12:01:41 +00:00
DjWarmonger
71e482ce7f Few tweaks for discrete values. 2012-03-04 11:19:34 +00:00
DjWarmonger
cd0ed39fbf Implemented rule-based evaluation of tactical advantage between armies.
AI will creep more agressively and smarter.
2012-03-04 10:43:46 +00:00
DjWarmonger
c5007f8bef Fixed #891.
Minor tweaks.
2012-03-03 12:42:53 +00:00
DjWarmonger
1354351a40 Fixed AI recklessly visting Utopia.
Made algorithm asctually working. Library fixes were needed.
2012-03-03 11:39:54 +00:00
DjWarmonger
998d8bf501 Added trivial fuzzy logic to handle creature banks estimation.
Check http://forum.vcmi.eu/viewtopic.php?p=6570#6570 for new library used.
2012-03-03 10:08:01 +00:00