Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 5 - Modders Workshop > Thread: New (unofficial) patch for ToE / AI mod
Thread: New (unofficial) patch for ToE / AI mod This thread is 46 pages long: 1 2 3 4 5 ... 10 20 30 40 ... 42 43 44 45 46 · NEXT»
Quantomas
Quantomas


Responsible
Famous Hero
AI Wizard
posted February 05, 2011 07:55 PM bonus applied by VokialBG on 11 Feb 2011.
Edited by Galaad at 21:43, 05 Jan 2021.

New (unofficial) patch for ToE / AI mod

[edit] Please don't post bugs in this thread. These go here: Heroes 5.5 - Eternal Essence - Known issues

[edit] Design ideas and discussion for gameplay enhancements: Heroes 5.5 - Eternal Essence - Design

https://www.quantomas.de/scripts-and-tiles/

discord

---

Hi to all HoMM fans!

I have created an AI patch for ToE that significantly improves on the AI performance. I loved the artwork and design of Heroes 5 but was somehow not satisfied with the AI, after I had experienced the glorious H3 AI back in the ol' days.

Beyond that I hope that this first (unofficial) patch can be the start of a community driven effort to expand Heroes 5 into a game that comes close to the vision its fans have. This is true in particular for the modders who have made a good creative effort to improve on the original game and would like to do more. As such I believe we have here a unique opportunity that thankfully has been approved by Ubisoft and that allows the community to direct a mature game project. H5 can live on, even with its bigger brother H6 on the horizon.

This AI mod is technically a binary patch that can be installed in parallel to the official version. But because the work on the patch was much more involved, we (as a community) have the opportunity to use this work as a basis to improve and implement other features we desire (more details follow further below).

This AI mod is a full rewrite of the AI inspired by the spirit of H3 and the chess computer program Fritz that has proven that a computer AI can be a match for world champions. It is meant to give the strategic gameplay of H5 a boost by playing against dedicated AI opponents who know the ropes. This AI does not cheat, on higher difficulty levels the only advantage it has is the lower starting resources for the player.

You can download the AI mod from www.bonddisc.com/ref/H5AI_31.zip. This zip archive contains a readme with installation instructions.

Included with the AI mod are three new maps (Icy Defense, Island Hoppers and My Home is My Castle) that are intended as a challenge for veteran players.

I hope you enjoy playing Heroes ToE with this AI mod. This is a fan created patch, but by no means a closed effort. I hope that this can be the foundation of a community effort to develop H5 into a direction its fans desire. You tell me what you would like to see improved -- the AI on the combat map, the AI on the adventure map but also other features you desire if it is feasible to implement them. It should also be possible to create the necessary interfaces for advanced mods, if this can help the overall effort.

As such I hope on feedback from you.

I am certain there are bugs in this (unofficial) patch. I have already a short list of issues that need fixing but if you encounter a bug please let me know.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
markkur
markkur


Honorable
Legendary Hero
Once upon a time
posted February 05, 2011 09:05 PM

As you can see; I moved our further discussion here to respond.

Quote:
Quote:
What issues have you targeted?



Quote:
It's a completely rewritten AI. It implements its own ultrafast pathfinder and as such is capable of evaluating magnitudes in order more possible paths the AI heroes can take. It has technically a lookahead depth of seven days (turns), compared to something like three days for the original one.


That is on-target I think. I am no programmer but again I think you've hit the nail on the head. Coming from me, it was just a guess but if you've seen the same, then that's promising.

Quote:
Still there are issues, particularly in the end game that still need improving. As such I see the AI patch as a work in progress.


That's to be expected. Gotta fine-tune it

Quote:
...beyond that I can imagine to reenvision the ToE campaign maps. Too many challenges are simply to build an army to beat garrison X. With an AI that can hold its own against veteran players, we have many more options to redesign parts of the maps to create a truly interesting strategic contest.


I'm excited about this. Even with the troubles that the H5-Editor gives, I still love it. Having the A. I. tweeked and working well will add a lot. With time, you may get some others involved. With H6 so near, many have turned this off but I for one will keep working in H5, even if H6 is great. Nothing wrong having two pots to cook in.

Quote:
In a way I believe that the AI is the core of a strategy game, and once this works, we can delve into using it for many advanced and interesting gameplay features.


Couldn't agree more. I've already experienced disappointment with making a great time-invested map to see the A.I. make it a nearly wasted effort.

One big flaw to me is the A.I. programming choosing to go just about anywhere on the map (no matter how large) to get "neutrals" instead of remaining near its home-town and at least building the basics in that town. Have you seen that and will your changes address that? I'm guessing again but stuff like that must be part of a decision-tree?

Again, welcome, glad to have you here.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
magnomagus
magnomagus


Admirable
Legendary Hero
modding wizard
posted February 05, 2011 10:04 PM

Quote:
This AI mod is a full rewrite of the AI inspired by the spirit of H3 and the chess computer program Fritz that has proven that a computer AI can be a match for world champions.


Do you have access to the source code or can you do all this by hex-editing?

Another question: Can you make this compatible with RPE and NCF? (unlock 999 creature and 64 class slots)

Quote:
As you can see; I moved our further discussion here to respond.


Moved from where?

____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Quantomas
Quantomas


Responsible
Famous Hero
AI Wizard
posted February 05, 2011 10:04 PM
Edited by Quantomas at 14:39, 06 Feb 2011.

Quote:

Quote:
...beyond that I can imagine to reenvision the ToE campaign maps. Too many challenges are simply to build an army to beat garrison X. With an AI that can hold its own against veteran players, we have many more options to redesign parts of the maps to create a truly interesting strategic contest.


I'm excited about this. Even with the troubles that the H5-Editor gives, I still love it. Having the A. I. tweeked and working well will add a lot. With time, you may get some others involved. With H6 so near, many have turned this off but I for one will keep working in H5, even if H6 is great. Nothing wrong having two pots to cook in.



Smart thinking. We don't know much of the AI capabilities of H6 at this point.

I invested already a bit of time in this to think of the possibilities. For example instead of a fixed demon garrison, it's feasible to have an additional underground demon lair with its own town, and linked by dimension doors.

It's not too difficult to do, but I rather would appreciate it if others would join this effort. I guess I will have to focus on fixing the AI issues first.

Quote:

Quote:
In a way I believe that the AI is the core of a strategy game, and once this works, we can delve into using it for many advanced and interesting gameplay features.


Couldn't agree more. I've already experienced disappointment with making a great time-invested map to see the A.I. make it a nearly wasted effort.

One big flaw to me is the A.I. programming choosing to go just about anywhere on the map (no matter how large) to get "neutrals" instead of remaining near its home-town and at least building the basics in that town. Have you seen that and will your changes address that? I'm guessing again but stuff like that must be part of a decision-tree?



Good to see that we share the same spirit.

Features like this are typically implemented by assigning values to objects on the adventure map. On the next level you can have these values being determined dynamically to adjust to different situations. Regardless protecting your home castle should have a high priority, which again requires another level of strategic evaluation. Aligning these levels of intelligence is critical and a source of failure in a faulty AI.

The behaviour you describe is all too common with the original AI, but the updated AI shouldn't waste time like this.

I could delve into more detail in another post to explain a bit of how the AI works.

In the meantime we could just test your map and see. What is its name and where do I find it? You could try that as well. The AI mod should be capable to load all maps designed for H5.


 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Proxeeus
Proxeeus


Hired Hero
posted February 05, 2011 11:53 PM
Edited by Proxeeus at 23:55, 05 Feb 2011.

Hi there!

I've tested your modification a little bit (mainly by observing the AI on the adventure map) and I must say; I'm quite impressed by the changes brought. Computer players correctly explored the map, flagged all mines, killed neutral stacks, took resources and visited special buildings in a totally consistent manner, whereas I've only witnessed doing it randomly (and sometimes not even doing anything) on the "stock" AI. It really looked like it gave at least some thought to its actions for the current turn and the few next ones!

Unfortunately, I can't really test things further at the moment, as I'm getting a regular application crash mid week 3 / early week 4 of the 1st month (had it on two TOTE maps so far), the savegame becomes corrupted; meaning that even if I relaunch the game and load the save, I'll still crash at the end turn phase

It may be due to my Heroes V installation that may have become a bit cluttered with mods - I'll test it on a fresh TOTE 3.1 tomorrow and let you know.

To make a long story short: big thumbs up, I'm really digging the potential this project has, well done. Please keep up the good work! Since what has put me off H5 for most of its lifespan was the faulty AI that shipped with it, a project like this seems almost too good to be true - if I can do anything to help, let me know.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Quantomas
Quantomas


Responsible
Famous Hero
AI Wizard
posted February 06, 2011 01:54 AM

Quote:

To make a long story short: big thumbs up, I'm really digging the potential this project has, well done. Please keep up the good work! Since what has put me off H5 for most of its lifespan was the faulty AI that shipped with it, a project like this seems almost too good to be true - if I can do anything to help, let me know.


Thanks a lot.

I am pretty sure that there will be tasks coming up that will make your help more than welcome. I will keep your offer in mind.

As a start, it would be a good thing if you could test whether the issue you described persists on a clean installation. I have done most of my testing on a clean (i.e. w/o mods) stand-alone installation of ToE. Another possible cause is if you are running the application on Windows 7. In this case you need to enable the Windows XP compatibility mode, but this is also a requirement for the regular version.

Looking a bit ahead, there might be an effort to recreate the ToE campaign with maps that allow for a more beautiful strategic contest as briefly discussed with Markkur a bit earlier. This effort would most likely need help from a couple of directions.

Apart from that, if we are going to improve the AI, there will certainly be demand for people who check out whether the upgrades work well. But let's not get ahead of ourselves, things will most likely need some time.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Quantomas
Quantomas


Responsible
Famous Hero
AI Wizard
posted February 06, 2011 02:04 AM

Quote:
Do you have access to the source code or can you do all this by hex-editing?


There will definitely be a need to explain the history how this AI mod came to be. But let's keep this for later, ok? Hex-editing alone would not suffice.

Quote:

Another question: Can you make this compatible with RPE and NCF? (unlock 999 creature and 64 class slots)



Does it not work? What are the requirements for this to work?

All the regular console commands and scripts should normally work with the AI mod.

Quote:
Moved from where?


The thread was originally started in the Heroes 5 forum, the 3.1 patch thread.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Proxeeus
Proxeeus


Hired Hero
posted February 06, 2011 12:10 PM
Edited by Proxeeus at 12:14, 06 Feb 2011.

Alright, I've spent more time with this baby this morning and here are my remarks

First of all, even with a fresh 3.1 TOTE install, executed on WinXP compatibility + administrator rights, crashes still persist, and when they happen, 90% of the time it's on Day 5 of the week, can't figure out why. But they happen randomly, I've had a game totally stable for all of its duration (2-3 game months) and other games where I crashed on day 5 week 1, for example.

Most of the time my autosave will become corrupted, and usually if I reload it with the stock 3.1 executable file, I'll then be able to end my turn without crashing, and be able to relaunch the next autosave with your modified 3.1 exe; but I don't do it too much because I'm pretty sure it'll corrupt stuff even further (and it's a bit cumbersome too )

Other than that, I've mostly focused on the adventure AI since it's what I'm primarily interested in for starters (also, I'm a noob at this game, so maybe some of these remarks will sound stupid).

- I tried to play on a map with Border Guards objects, and for most of the computer players, it just totally "bugs" them out. I've had the blue comp hanging on the border guard with 3 of its heroes for weeks without doing anything.

- The AI sometimes walks by a totally unguarded pile of resources and ignores it, and then comes back a couple of turns later to pick it up.

- Similarly, it'll sometimes clean the way to a guarded mine, vanquish the guarding stack, take a couple of resource stacks near the cleaned mine, but won't actually flag the mine, leave the sector, and then come back 3-4+ turns later to flag it.

- The same thing sometimes happens for stacks of resources (it'll clean the way leading to it and everything, but won't actually take the resources).

(note that this happens *sometimes*. Most of the time the AI will remain consistent in it's flagging/creeping duty).

- The AI sometimes chain-uses a teleporter, going back & forth from the same spot to the other same spot, then actually moves (dunno if teleporters actually teleport heroes randomly -hence why the AI may 'test' the teleporter- or if they're fixed).

- On the topic of crashes, sometimes, when I can actually reload my savegame and resume playing, I notice that the AI executes its turn differently from what it tried before crashing earlier, making me wonder if the start of an AI turn "thinking" about its moves could be related to these crashes.

- Ok this one may totally be map-dependant; but from what I've seen so far, AI uses a lot of mixed creatures, like a Haven hero having some Haven troops mixed with Necropolis troops or stuff like that. Dunno if it's intended or not, as I said, it may be dependant on the type of troops the AI may have access to at a given time etc (and being a Heroes V noob, I really have no clue, maybe it's a valid strategy I dunno )

That's it for now, I hope it'll be of any use to you. I'm eagerly awaiting the next versions !


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Quantomas
Quantomas


Responsible
Famous Hero
AI Wizard
posted February 06, 2011 12:40 PM

Quote:
Alright, I've spent more time with this baby this morning and here are my remarks

First of all, even with a fresh 3.1 TOTE install, executed on WinXP compatibility + administrator rights, crashes still persist, and when they happen, 90% of the time it's on Day 5 of the week, can't figure out why. But they happen randomly, I've had a game totally stable for all of its duration (2-3 game months) and other games where I crashed on day 5 week 1, for example.


Windows 7 can be a pain. I have a multi-boot test PC with Windows 7 on one partition and Windows XP on another. I had crashes with the stock version (3.0 and 3.1) and the ai mod occuring randomly. One time even at displaying the intro logo! I just gave up on using Heroes under Windows 7. Even if it works, it can't be faster than using Windows XP natively.

Regarding your feedback to the adventure map:

The ai does a lot of advance processing, and in some circumstances it may be more valuable for the ai to battle some creatures, that guard resources or mines, and then move on to reach spot X a couple of turns later just in time. Whereas collecting the resources would foil this.

The ai is a bit more relaxed when to pick up resources, depending on whether it really needs it. It might just decide that there is nobody else in the vicinity and a support hero can pick up the resources later. But sometimes you can notice it really goes for the sulfur and mercury.

If the same hero comes back later, there might also be more involved reasons in finding the best order to do things, which are not so clear for a human player. Sometimes it's better for a hero to gain the experience from battling creatures, and then, if circumstances on the adventure map have changed, come back to pick up resources later.

Border guards are the toughest challenge for the ai design and I am certain there are still bugs. Work on this continues.

Teleporters can indeed be random, if more than two dimension doors are linked together. The ai tends to use its spare time (if it can reach spot X in a given time anyhow) to do some teleporting.

Having a larger variety of creatures in an army to augment its strength is by design and they come often from refugee camps. They are replaced once the ai has enough creatures of its preferred type. What I have left in so far, are two stacks of the same creature with alternate upgrades for sake of variety and to have the ai not be too tough. But this is just a simple switch, and this behaviour will be changed in the next update.

Thanks a lot for your feedback.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
markkur
markkur


Honorable
Legendary Hero
Once upon a time
posted February 06, 2011 04:18 PM

Quote:
For example instead of a fixed demon garrison, it's feasible to have an additional underground demon lair with its own town, and linked by dimension doors.


I don't follow you here. What do you mean by "garrison"? I assume your not talking about a town's garrison, maybe an "outpost"? And is "demon-lair" a region on the map? or do you mean the demon dwelling?

Quote:
It's not too difficult to do, but I rather would appreciate it if others would join this effort. I guess I will have to focus on fixing the AI issues first.


Well, I hope for your efforts it is; "Build it and they will come" I regret I cannot help directly but I am a good idea person and would like to help where I can. If you get to a point where you need a map-maker that loves the grunt work of building the world than I would be ready to play a role in that effort and just call on me at that time. I've found out recently, that it is a very good "team approach" when there is a true-scripter and a real eye-candy freak working together creating a map.

Quote:
I could delve into more detail in another post to explain a bit of how the AI works.



I've an idea and it may be a waste of time but could you post a decision tree or whatever you would term it that the A.I. would follow? Not the codes but the choices with weighted selection. iow, (the flow of the logic). Someone could have a good idea or experience to lend. If this would be a lot of work then don't bother. Remember, I'm very ignorant of your field of work/play.


Quote:
In the meantime we could just test your map and see. What is its name and where do I find it? You could try that as well. The AI mod should be capable to load all maps designed for H5.


My map has not been released yet. I was in the testing phase when I saw the crappy A.I. at work. I would greatly appreciate having you assist in making it ready for others to play.  If you could test it that would be...better than great. I'll upload it to a file site and send you the link, or if you have an e-mail that you use for this purpose I can send it there. HCM me in that case.

Anyway, one more thought concerning A.I. in general that could be revelant to your Mod. How does the original random settings figure in to this work? I was considering the crashes or conflicts and wondering about their origins and remembered that the H5-Editor has 5 different selections for the A.I., presumably to alter the strategic priorities as we've discussed. Does your Mod override all of that or could it be affected by what the "base-random-selection was? That would explain varied results. Probably my ignorance showing but I had to ask.  

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Quantomas
Quantomas


Responsible
Famous Hero
AI Wizard
posted February 06, 2011 06:11 PM
Edited by Quantomas at 18:25, 06 Feb 2011.

Quote:
Quote:
For example instead of a fixed demon garrison, it's feasible to have an additional underground demon lair with its own town, and linked by dimension doors.

I don't follow you here. What do you mean by "garrison"? I assume your not talking about a town's garrison, maybe an "outpost"? And is "demon-lair" a region on the map? or do you mean the demon dwelling?


I meant to refer to Iluma-Nadin in the Last Soul Standing map (town C). There is just a hero with his army (demons) sitting. What the player has to do, is to build an army to beat this "garrison" (I tend to use this term for any fortified army position).

You have the same situation in the next map The Grim Crusade and in different variations in a lot of other campaign maps.

My suggestion is, not to have a fixed hero sitting in a garrison/castle but to have this hero starting out with a regular initially small army, maybe with some boni or powerful artifacts.

In addition to that there can be a demon "lair", technically a region on the underground level that has Inferno terrain, an Inferno town and a good deal of mines and Inferno dwellings nearby. The creatures from this lair will constantly reinforce the hero in the garrison/castle.

The garrison/castle and demon lair can be linked by dimension doors in suitable places to make this type of reinforcement feasible.

The idea is to enable a good player to make an attempt to capture the guarded garrison/castle and win the game at any time. This will definitely require to scout the map and some hero/army building, so it cannot be done immediately.

Additionally the demon lair might be able to raid the player if he/she is lazy. This might be realized by having portals between the demon lair and some valuable strategic locations on the map, that might hold gold mines, artifacts, access routes to key towns and the like.

Sort of a real strategic contest, where the player is required to scout the map intelligently, use strategic locations to his advantage, but has much more freedom. Also, if the player cannot cope to build an army sufficiently fast, the mission will be lost.

If it helps I could develop a more detailed map layout that defines the size and content of the demon lair, the links (dimension doors) between different strategic places on the map, access routes that are meant to be vulnerable to raiders and the like.

Please let me know, if this concept is clear from this description, or if need to fill in more details.

The implementation would consist of creating the map, redefining and fine-tuning the victory conditions and also tweaking the ai and some scripts to get the job done proper. I am not sure whether I will have the time to develop a visual tool that would extend the map editor and allow for the balancing of the gameplay, the ai accessible regions and the like, but it's a possibility.

Quote:
I've an idea and it may be a waste of time but could you post a decision tree or whatever you would term it that the A.I. would follow? Not the codes but the choices with weighted selection. iow, (the flow of the logic). Someone could have a good idea or experience to lend. If this would be a lot of work then don't bother. Remember, I'm very ignorant of your field of work/play.


I guess I will provide a description how the ai works in a central place, not a forum thread, once I find the time for it. Technically, using a decision tree is way too slow to realize an ai of the type implemented. The ai processes many millions of alternative paths over a high number of different adventure map objects in a second. For this there are many highly optimized layers for evaluating actions mathematically. It's more like an algebra than a boolean logic. Just to give you a rough understanding how abstract it is.

Quote:
I would greatly appreciate having you assist in making it ready for others to play.  If you could test it that would be...better than great.


It would be an honor. I will HCM you for the map file.

Regarding the map A.I. settings, the ai mod overrides those completely. As for the source of the reported crashes, I suspect that people are using Windows 7, or some other mods. The tests we did here with this build on Windows XP machines on a clean ToE installation, produced very rarely a crash. Particularly the build released is very stable. In any case the cause has to be pinpointed.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Proxeeus
Proxeeus


Hired Hero
posted February 06, 2011 06:23 PM
Edited by Proxeeus at 18:24, 06 Feb 2011.

Quote:
As for the source of the reported crashes, I suspect that people are using Windows 7, or some other mods. The tests we did here with this build on Windows XP machines on a clean ToE installation, produced very rarely a crash. Particularly the build released is very stable. In any case the cause has to be pinpointed.


Looks like it may be a Win7 (or 64 bits?) issue indeed - I've ran some tests for the past hour and a half and didn't get a single crash over the course of three scenarios on a WinXP machine :/ May be just luck, but I doubt it.

I guess I'll have to find a way to stabilize this on my Win7 machine.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
markkur
markkur


Honorable
Legendary Hero
Once upon a time
posted February 06, 2011 10:29 PM

Quote:
[ As for the source of the reported crashes, I suspect that people are using Windows 7, or some other mods. The tests we did here with this build on Windows XP machines on a clean ToE installation, produced very rarely a crash.


ofc, I'd be using Win7. I am considering very strongly doing the XP partition. Too many older games of mine do not like 7.
____________
"Do your own research"

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
magnomagus
magnomagus


Admirable
Legendary Hero
modding wizard
posted February 07, 2011 12:21 AM

Quantomas, Thank you for your answers I noticed the mod can work with RPE and NCF if the exe files are renamed to H5_Game.

It is not necessary for me to know the development history of the mod I was merely curious if you would be able to make changes in the exe file like this (just examples):

-Make the training, elemental chains, avenger guild buildings work for all heroes on the map that have the counterstrike/irresistible magic skill instead of limiting the functionality of the buildings to specific classes.

-Make the warcry building work as a (limited) regular mage guild for non barbarian heroes.



____________
MMH5.5 Downloads | MMH5.5 Translations | MMH5.5 FAQ

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
markkur
markkur


Honorable
Legendary Hero
Once upon a time
posted February 07, 2011 05:21 AM

Quote:
Please let me know, if this concept is clear from this description, or if need to fill in more details.


Thanks but it's not necessary, you've explained well.

{quote]The ai processes many millions of alternative paths over a high number of different adventure map objects in a second. For this there are many highly optimized layers for evaluating actions mathematically. It's more like an algebra than a boolean logic. Just to give you a rough understanding how abstract it is.


Never mind explaining this any further. I can see that it would reguire more understanding than I possess.

Quote:
Particularly the build released is very stable. In any case the cause has to be pinpointed.


Pin-ponting in Win 7 is probably difficult at best. Thank you very much for both your time and explanations. Since I do want to take advantage of your Mod, It's clear to me now that I need to get back to the XP platform.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Gnoll_Mage
Gnoll_Mage


Responsible
Supreme Hero
posted February 07, 2011 12:29 PM

Very much looking forward to an explanation of how the AI works, and in particular how on earth you managed to modify the game so heavily!
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Cepheus
Cepheus


Honorable
Legendary Hero
Far-flung Keeper
posted February 07, 2011 04:11 PM
Edited by Cepheus at 16:12, 07 Feb 2011.

This patch is incredible. Thank you Quantomas.
Like others I'm very interested to hear your methodology here, since your mod goes beyond anything the community has been able to produce so far. It's clear that you edited hard-coded stuff that would normally demand access to the source code, hence our interest.

I think that the mod is based on patch 3.0, however, so some of the exploits mended in the next patch are back (invisibility problem for instance)... other than that it's been stable and difficult enough for me, well done

P.S. the creator of Icy Defense deserves three cheers. Beautiful map.
____________
"Those who forget their history are inevitably doomed to repeat it." —Proverb, Might and Magic VIII

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Quantomas
Quantomas


Responsible
Famous Hero
AI Wizard
posted February 07, 2011 04:38 PM
Edited by Quantomas at 18:36, 07 Feb 2011.

@Markkur: Thanks for your map. Well received and I will provide feedback. Regarding your questions what promted the work on the AI, here follows a bit more elaborate answer, that I wished to share right away.

Essentially, what I hope for is to have H5 live as long as H3 did, and to create an example of a strategy game that is powered by a good non-cheating AI.

There are so many examples of strategy games out there that have a promising setting and design. But it's very hard to find a good game that gives you a truly fair challenge. There are all kinds of cheats to increase the difficulty, extra space ships, extra population growth, extra creatures, you name it. As if the companies behind these games couldn't do any better, as if it would be impossible to create a good AI that can match a skillful strategist's wits.

Having gone through this effort with this AI mod for H5, I am fully aware that this type of work is a real challenge for many developers. It's not only about designing artifical intelligence, it's just as much about processing speed. The amount of preprocessing the AI does is insane. It was one of the main challenges to get the preprocessing even on a huge map done within a maximum time frame of 30 seconds. Most of this is done by highly optimized routines that fit all data into the processor cache to gain a factor of 5 - 10.

Another example is the pathfinder in the AI mod that is capable of looking up the shortest path between two points in nearly constant time, thus enabling the evaluation of milllions of alternative paths in a second, which in turn is critical for reaching good lookahead depth. Given all the complex rules for the terrain in H5, monsters blocking paths, not to forget teleporting and ship building/boarding, this is no small feat. Many developers think that the computing requirements for turn-based games are low. Far from it, this pathfinder had to be faster than what is typically required of a real-time strategy game.

That is one, probably the biggest reason, that good examples of turn-based strategy games that get it right are rare. Master of Orion II is my favorite one. The chess computer program Fritz counts as well, even if it is technically a board game.

In the end strategy is about the balance of power and what you can achieve with a given leverage. If the AI cannot hold its own and contest the player's forces, the challenge is a shallow one indeed, not necessarily easy, more like grind work and lacks the elegance of strategic mastery.

On the other hand the formula of the Heroes games had me always coming back again and again after a while of abstinence. As such it was a natural target for me, to have these two elements join, the addictive gameplay of the Heroes franchise with an AI that can give it depth.

That is where we are now. For me, this AI is a first step into the right direction, sort of a prototype that still needs to be developed to its full power.

But I am also aware that it is the content that makes a strategy game live and breath. Map making is an important part of it.

What I hope for is that we can create maps for human and AI players who adapt to this balance of power and give their best to shift it to their advantage. Maps that are designed around an inherent balance of power where two or more sides contest strategic locations and resources by skill. It will be a learning process to figure out how this is done properly, but I believe this is a worthy goal.

@Gnoll_Mage and @Cepheus: You are welcome I will put up something in a central web space, once I find the time. Things are truly busy in the moment and I have to get my regular work going as well.



 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Proxeeus
Proxeeus


Hired Hero
posted February 07, 2011 10:26 PM
Edited by Proxeeus at 22:30, 07 Feb 2011.

So I gave in and made a special partition on my hard drive and installed Windows XP + Heroes V ToTE 3.1 on it (yes, I really want this to work ) and made some tests.

Conclusion: crashes still happen, with the same symptoms, as if I were on Win7.

When the game is about to crash, the turn prior to the turn crashing usually takes an abnormally long time (I'm talking about 45s to 1+ minutes. I usually get less than 5 secs when all's well). When that happens, the comp's hanging for a long time, music is still playing in the background, and then after an eternity, the AI resumes its work.

When I next hit end turn, I'm crashing. Every single time It's the same pattern.

So I've got the exact same issues on Win7 64 & XP 32, both with fresh drivers + installs of Heroes V. At this point, I don't really know what to think of that, since I never have any crashes on regular ToTE, it's rock-solid, even on Win7.

Since I'm guessing you have access to some sort of source code/SDK it'd be interesting to have a look at the beginning of turn algorithms and see if some sort of memory leak isn't happening.

Exciting times nevertheless
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Quantomas
Quantomas


Responsible
Famous Hero
AI Wizard
posted February 07, 2011 11:16 PM
Edited by Quantomas at 23:22, 07 Feb 2011.

Quote:
So I've got the exact same issues on Win7 64 & XP 32, both with fresh drivers + installs of Heroes V. At this point, I don't really know what to think of that, since I never have any crashes on regular ToTE, it's rock-solid, even on Win7.

The tests on Windows XP SP3 machines here with the build released, produced one crash in 100 hours of playing time. But they have all plenty of memory (4+ GB). How much memory has your PC?

[edit: another thought, what are your virtual memory settings?]

Thanks a lot for your patience and feedback.

Quote:

-Make the training, elemental chains, avenger guild buildings work for all heroes on the map that have the counterstrike/irresistible magic skill instead of limiting the functionality of the buildings to specific classes.

-Make the warcry building work as a (limited) regular mage guild for non barbarian heroes.


This is indeed my offer to the community, to expand Heroes 5 dynamically. But this needs to be a carefully planned process, and the first step is to collect ideas, to see what the people desire. It wouldn't be right to change game fundamentals directly, but there is definitely potential for implementing an advanced modding interface, so that these features become possible.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 46 pages long: 1 2 3 4 5 ... 10 20 30 40 ... 42 43 44 45 46 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1276 seconds