Black Raven - the last barrier
ZXNet echo conference «zx.spectrum»
From Vyacheslav Mednonogov → To All 16 May 1997
Get msg, All!
Work on the CV has slowed down somewhat. The reason is the need to determine for each hero the enemies within his reach. Especially when using a computer, the soldiers of which have a fairly large field of view (how else can you do artificial intelligence? :) An attempt to solve it head-on (by comparing “all against all”) did not bring success :((
Hopefully, the problem is solvable. I am interested in the experience of the Dune 2 developers in
this area (or are they stuck on this?)
With warm greetings, Glory.
From Yury Matveyev → To All 18 May 1997
Hello, Vyacheslav!
In a msg originally to Sergei Novikov, Vyacheslav Mednonogov said:
SN>> at a very large!) distance you can look for enemies. Moreover, as far as I
SN>> remember, in Warcraft 2 your units do not attack enemies at all until they
SN>> hit them (but don’t be like all sorts of IBM =).
VM> I think this is not so, because in this case the computer soldiers
VM> become easy prey for catapults and all sorts of “rains of fire”.
This is where we argue nothing: the “attack” command must be given by a person. A unit
that is attacked by an enemy enters into a fight because it is forced
to defend itself. And as you know, the best defense is an attack :)
VM> So it will be - these are the guards. Moreover, they usually return to their place after repelling
VM> attacks. However, neither in the 1st nor in the 2nd WarCraft
VM> does the computer try to restore fallen guards (???). IMHO, this is stupid,
VM> but maybe that’s how it should be?
You don’t have to endure the glitches of the original. Of course, try to restore the protection.
It will be more interesting and smarter on the part of the computer.
VM> In general, yes, it’s a small matter - scan :) Even if we take Sight=4 as the average
VM>, then we will have to scan more than 80 cells.
The method that I suggested to you allows you to reduce this number to 16 :)
Or up to 32 (in casewith diagonals).
SN>> b) if no one attacks us, we attack ourselves: we run to the place where
SN>> there is an enemy town hall; if along the way we notice
SN>> an enemy, we kill him and run further);
VM> I’m not sure that this is the best option (usually the
VM> team is typed first).
You can simplify your task by limiting the accumulation of forces to a certain number, after which
you let them all attack the base. Or in portions.
VM> In general, yes. But the problem is only with scanning.
What can you say about this method?
Either like this: “-I-” or like this: “*”
Yuri
From Sergei Novikov → To All 18 May 1997
The same thing in Dune 2. There, 4 parameters are set in the editor for each unit:
Guard - similar to the game one - stand until someone hits you; Area Guard -
stand and guard an area of a certain radius (>10). After defeating the intruder, return to the place. Ambush - to stand in ambush - to wait until someone
runs into it. Hunt - to hunt - the unit itself searches for the target. After destruction it looks for
another. He doesn't pay attention to the guns.
The most interesting thing is that you can give the same commands to your unit - and
the computer itself will command it - just like the enemy - you put 20 Devastators 3 on
Hunt - they themselves will destroy everything.
VM> However, neither in the 1st nor in the 2nd WarCraft the computer does not try
VM> to restore the fallen security (???). IMHO, this is stupid, but maybe this is how
VM> is necessary?
In Warcraft, the computer is ___TERRIBLE___ down - it needs to learn from HMM2!
SN>> on the spot and wait for your units until one of them
SN>> gets into Sight. Sight should be made small (3 for footman, 4 for
SN>> archer, 5 for ranger, 4 for knight, 5 for palladin, 3 for conjurer, 3
SN>> for mage, 2 for scorpion, 2 for peasant, etc. =). The largest site
SN>> is for catapults/ballistae (7). At this distance you scan the area
SN>> checking it for enemies.
From Dmitry Grigoryev → To All 19 May 1997
Well, let them stand and scan. With a beam - at least the entire field. In 10 cycles the entire circumference will be scanned. If anyone is caught, let them chase them. Eh?
VM> (copying WC1 down to the glitches :)))
Or maybe, like in UFO 1, it’s better to develop the idea? :)
VM> Warm greetings, Slava.
Regards, Dmitry (OLDMAN).
From Sergei Novikov → To All 20 May 1997
Greetings, Vladimir! Glad to see you again!
Answering yld Monday, the 19 of May 1997:
YM>> You can also limit scanning from behind the warrior.
VY> Quite an interesting idea, for example, it will be possible to sneak up
VY> on units from behind and suddenly attack.
For catapults, which have the highest Sight, you don’t have to scan the center, because
they (catapults) still don’t shoot at a short distance.
Hasta la vista, Vladimir! See you in Eden!
From Vyacheslav Mednonogov → To All 21 May 1997
YM> What can you say about this method?
YM> Or like this: “-I-” or like this: “*”
I think that this method can be slightly developed and scan only along
the contour, i.e. cells located on the border of visibility. It is logical that any
enemy, in order to get closer to the warrior, will have to cross him. The only
drawback will be that after completing the “showdown” with the next enemy, the warrior
will have to scan the entire area (suddenly, while he was fighting, someone else got inside it). But this will need to be done only once, and then again
go to scanning along the contour.
It’s already better (for example, Sight=4, 32 cells are scanned, not 80), without loss
reliability (as in -I- or *).
Perhaps even “better than searching head-on” (there is still a difference - scan 32
cells or the data of 48 enemy heroes, for which you need still count the distance)
But still not fast enough :(
Warm greetings, Slava.
From Vyacheslav Mednonogov → To All 21 May 1997
Get msg, Dmitry!
19 May 97 19:46 -- Dmitry Grigoryev reported to Vyacheslav Mednonogov about Black
Raven - the last barrier:
VM>> And for computer warriors, for a normal game, Sight= :((( DG> Well, let them stand and scan. With a beam - at least the whole field. Cycles for 10 Why for 10? Maybe more? The idea is clear - partial inspection at each cycle. I also decided to do this, unless I come up with something better, I’ll divide all the warriors Warm greetings, Slava.
DG> will scan the entire circle. If they catch anyone, let them chase them.
into groups and work with only one group at each step. will worsen
the reaction :(((
From Vyacheslav Mednonogov → To All 21 May 1997
VM>> team).
SN> Okay, we wait at the barracks until there are 4 units - and into battle. And better than 9 -
SN> then the computer will play very hard - not every
SN> will be able to fight off 9 units at a time!
I haven’t gotten to this yet, but in WC1 there was a special place(s) for
gatherings. It looked better than in WC2, where the squad started from the barracks, but
the weak point turned out to be that enemies could be intercepted while they
one by one walked from the barracks to the gathering place.
SN> PS: you can introduce an additional mode - for computers with turbo online - there
SN> and the computer will think more, and it will be possible to hang more effects
SN> (animations during games).
So, there’s only 4k left, there’s not much you can do :(( Not that
effects/animations - I’m thinking about throwing out the music (after all, there’s still 5k left :) The
reduction may also include effects for GS, shipping of game situations,
certain functions, such as the construction of fences and paths. Continuous troubles :(
With warm greetings, Slava.
From Igor Gruzdev → To All 22 May 1997
This, I don’t quite understand all sorts of scanning, but what if you scan
only what is included in the viewing angle? That is, not a circle, but a semicircle?
With all sorts of regards and wishes.
Igor.
... Everything is bought from them, but everything has already been bought from us.
From Vyacheslav Mednonogov → To All 26 May 1997
*** Reply to msg taken from NETMAIL.OF.SLAVA (Slava's Netmail).
Get msg, Nicolaus!
21 May 97 00:46 -- Nicolaus Mezencef told Vyacheslav Mednonogov about Black
Raven - the last barrier:
(Cool, there should have been some thread more global subj to the conversation, like
"Problems of artificial intelligence on the Spectrum" :))
To have a complete picture, I want to consider the method proposed by
N.Mezencef.
(I remind you that we were talking about scanning each real_time_strategy
terrain around him to select a target)
NM> Why not, instead of scanning squares, just look
NM> the coordinates of objects on the other side. I don’t think that even with
NM> the maximum number of objects on both sides it would take more than
NM> interrupts. If the reaction time is 1 sec. (in the sense that objects
NM> perform actions once per second), then such a review of enemies will be
NM> negligible in terms of “consumed” resources.
That is. The question arises - what is better: to really honestly look at the squares
around the hero or to compare his coordinates with the coordinates of all the enemy heroes. In principle, the first method has already been discussed in detail (unlike
the second). Nikolay suggests using method two with the following optimization:
NM> You can do this againoptimize: when an object
NM> moves, it itself informs hostile objects about its entry
NM> into their visibility zone. In this case, if there were no movements,
NM> then scanning is not necessary.
A very (IMHO) good solution - in fact, all the work will be carried out only
with _moving_ heroes. A little unusual, i.e. those not standing on the defensive will
scan the area, and moving opponents will signal to them about their
approach. And as you know, most of the time the parties accumulate their forces
and do not move. Of the big disadvantages of the method, perhaps, there is only one:
all these calculations will definitely have to be applied to peasants/peons, who
are constantly on the move. And there may not be so few of them (usually 15-25% of the total number). Of the small ones, Nikolai noted the following:
NM> If any global event occurred, for example
NM> a spell appeared that increases farsightedness, then a
NM> global rescanning is carried out for all objects on both sides,
NM> rescanning can still be done once every ... 3 minutes to prevent
NM> possible glitches.
Rescanning may be required in some other cases (hero 'killed'
the enemy and must look around for a new victim; enemies going on the attack
can additionally scan the area in order todon’t miss the soldiers playing in the rear, although this is not done in WC2). But these are really trifles :)
* * *
To logically complete the topic, I would like to briefly describe the method that I decided to use.
The entire playing field is conventionally divided into squares (when applied to CVs, squares of 8x8 cells turned out to be the most suitable). For each of these squares
a list of enemy heroes included in it is compiled. If there are no
opponents in a square, the list for it will be empty.
Scanning for each human warrior consists of looking at 9
squares (8 around and the one in which he stands). If there were
opponents in the square, an additional comparison of coordinates is carried out to determine the
reachability of the enemy.
The same procedure is carried out with enemy warriors.
The idea is based on the fact that most of the time all the characters
of the opposing sides are at a considerable distance from each other, and
therefore, the lists associated with the inspected squares will be mostly
empty.
As an alternative, it is possible to use squares 4x4, but then for all
heroes whose Sight>4 will have to examine not 9, but 25 squares :(
A little difficulty is compiling lists, but these are just
small technical problems :))
CWarm greetings, Slava.
ps2MOA\ perhaps this is, as always, another bike :)