Replies: 2 comments
-
Hi, @jez9999. fheroes2's goal has always been to provide a more challenging AI. It has been made from scratch and developed with the intention to have it make the most optimal decisions. The long term goal has been to create an AI that performs at least equal to an average human player. This is still not achieved, but in general (but not in every case) playing against the fheroes2 AI is more challenging than against the original AI. One of the few cases in which the fheroes2 AI is less challenging are the maps where the original AI's advantage of having a 100% explored map from the beginning has been used to create the challenge in the map. Meanwhile, the fheroes2 AI does not have this cheat and has to explore the map itself. Anyways, it is possible to implement more AIs in the engine, so anyone is free to do what they want, the project is open-source even. However, since our resources as a team are limited (our AI has been developed by 3 people with additions from some contributors, all of them in their free time), and since the original game's AI already exists and can be experienced with DOSBox or other ways, our decision was to make a completely new AI that aims to be as challenging as possible on the higher difficulties (lower difficulties still need to be approachable for novice players.) Some players prefer the predictability of the original AI, and this is fine, and we are also aware that many original maps most likely took the original AI into consideration when they were designed (sometimes map designers don't playtest though). We are not bashing the original AI, and to quote one of our AI developers, @idshibanov: "Original game AI code was written by a single person (Phil Steinmeyer) targeting Intel 80486 processor (<100 MHz) and 8 MB RAM. It had to take shortcuts (cheating battles and no fog of war) but was great for its time.". The fheroes2 AI does not play optimally and I have yet to play an official map which becomes impossible to beat. We frequently playtest to check this, and we also often reduce AI boosts/advantages, which are anyways lower than the original AI's. Here is an old discussion we had on the original AI's boosts and what to do in the engine, much has changed since then. There are also other discussions: #5797 EDIT: There are also other advantages like higher chance of getting Dimension Door that the original AI has that we do not want to give the fheroes2 AI. This page provides very good articles detailing how the game works: https://handbookhmm.ru/kakim-obrazom-zaklinaniya-popadayut-v-magicheskuyu-gildiyu.html |
Beta Was this translation helpful? Give feedback.
-
As @zenseii already said, fheroes2 AI is written from scratch and it has many improvements over the original AI, both at the strategic level and in the management of troops during the battle. At the strategic level, the most notable differences are the ability to effectively use spells like Dimension Door, Town Gate/Portal, Summon Boat and use Marketplaces for the rapid castle development. Consider the following video from the original game (AI has 1 castle and 5 towns with Marketplaces built, one of the towns can be upgraded to the castle, 12 Gold Mines and nothing more, Gold-only economy): DOSBox.0.74-2.1.Cpu.speed_.max.100.cycles.Frameskip.0.Program_.HEROES2.2023-12-27.01-24-15.mp4At 1-3-1 original AI has two frankly badly developed castles (apparently, that's what it was able to build due to the resource bonuses that the AI gets in the original game). Consider the following video from fheroes2 (the same map & initial conditions): fheroes2.engine.version_.1.0.11.2023-12-27.01-22-10.mp4As they say, no comments. The behavior in battles is also significantly different - as just one example, fheroes2 AI would not miss the opportunity to eliminate both stacks of Black Dragons with one attack in the first video at 0:46. In general, fheroes2 AI is more "honest": as a whole, it doesn't do something that a human player wouldn't do - for instance, it can't see the whole map at once without scouting and can't do things like this: |
Beta Was this translation helpful? Give feedback.
-
I'm just trying fheroes2 now for the first time as HOMM2 Windows version just doesn't work properly in Windows 10. I'm wondering how you guys reimplemented the AI? I'm guessing you didn't reverse-engineer the original AI so did you just implement your own AI and try and guess how the original was implemented? If so, wouldn't the AI potentially play some scenarios quite differently from the original, in terms of their manner of exploration, aggressiveness, castle upgrading, etc? Some of the scenarios are quite hard because the AI starts out with way more resources than you and it kind of relies on the original AI not playing optimally - it would be near-impossible if it did play optimally.
Beta Was this translation helpful? Give feedback.
All reactions