******************************************************************
********   Combat-shotgun Modified Automated Trainer (CMAT) Version 2   *******
*                                                                         
*  Primary design and playtesting: Ocelot (ocelot_78@hotmail.com).      
*  Rating research and miscellaneous design: BahdKo (bahdko@erols.com).     
*                                                                        
*  Automatic rating calculator (cmat.exe): Programmed by Dashiva          
*  (dreamdestroyer@hotmail.com), based upon the Win32 "PRBoom" Doom         
*  source port by Florian Schulze (florian.proff.schulze@gmx.net) and      
*  Colin Phipps (cph@cph.demon.co.uk).                                      
*                                                                           
*  Bot executable based upon Ugwad's Auto Player (ugwad@bigfoot.com),     
*  a modified Doom2 executable that was created using DeHackEd              
*  (By Greg Lewis (Tree), gregl@umich.edu).                                
*                                                                         
*  Wad based upon ss-map1.wad, author unknown, better known as Dwango5 Map1.
*  Modified by Ocelot and BahdKo.                                          
*                                                                         
*  Special thanks to Adam Hegyi.                                           
*  Doom2 was made by ID software.                                       
*                                                                        
*                The Doom2.net CMAT ladder is sponsored by                  
*       The Doom2.exe Deathmatch Alliance: www.doom2.net/~alliance          
*******************************************************************************

    Documentation date: October 6, 2002, by BahdKo
    (Maximize this window for best text alignment)

              
******************
* How to use it: *
******************

Unzip the files into your Doom2 directory (do not permit it to overwrite
the .dll files, if it asks, unless you have a prior-installed, really old
version of PRBoom).

Type "runcmat" from the dos prompt. This will open the CMAT Ladder Main Menu.

To play against the bot, hit 1 from the Main Menu. Immediately engage the bot
and attempt to kill it as efficiently as you can.

If the bot kills you, hit "q" in game to return to the Main Menu, and hit 1
to try again. Do not simply respawn and begin fighting the bot again without
restarting from the Main Menu.

You must kill the bot in order for a correct CMAT rating to be calculated.

When you kill the bot, it is important that you do not fire your weapon again.
Collect any remaining stimpacks until you have 100% health, exit the map,
and then hit q to return to the Main Menu.

To view the CMAT rating of your most recent round, enter option 2 in the Main
Menu. Note that Option 2 cannot check to see that you actually killed the bot,
it just does an analysis of the data and generates what would be a correct CMAT
rating for a completed round. It is useless to use option 2 if you did not
actually kill the bot in the most recent round.

If you like your rating and would like to save a recording of your most recent
round, use option 3. A recording file named "saveme.lmp" will be created in your
doom2 directory. This is the file that you would include in an email to claim your
place in the CMAT ladder.

There are other miscellaneous, hopefully useful options in the Main Menu as well.


***************
* What is it? *
***************

This is a Doom2 modification in which you "play against" a modified shotgun sergeant.
The shotgun sergeant has 3500 hitpoints, moves rapidly (usually in a large zigzag
pattern toward you), and shoots you occasionally. Your goal is to kill it as effectively
as possible. "Effectively", in this case, means as quickly as you are able.

Due to the automated CMAT ratings calculator requiring a demo to work, CMAT gameplay
includes a menu-based batchfile. All CMAT rating attempts are recorded by the batch
file as "mydemo.lmp". There is option for renaming your most recent demo to another
filename, 'saveme.lmp'.

Its first use was as a training tool, to help increase combat shotgun handling
effectiveness. It was later adapted to include a CMAT numeric rating that both
provided enhanced feedback for training, and permits comparison or competition of
performances between players.

The cmat numeric rating is an evaluation of the player's performance against the bot.
The primary factor taken into consideration is how much damage you can lay down in the
shortest period of time. Very high ratings also take Average Hitpoint Infliction (AHI)
into account. The amount of damage you take while fighting the bot also counts against
you, although effectively to a much lesser degree than the other factors.


********************************************
* Some frequently asked questions/comments *
********************************************

Q. The bot skips around and it's annoying looking, can't that be fixed?

A. This is a more complicated problem than it may appear to be. In order to
maintain a true Doom2 look and feel, the bot's "THUGHACK" executable is nothing
more than a dehacked patched doom2.exe. Dehacked's changes do how Doom behaves can
only do certain things (it is not actually re-coding doom, like the ports do).
In testing with dehacked, it was found that the "skipping" appearance of the
bot is caused by a combination of an extra large step size being assigned to the
sergeant, and a mismatch in the actual speed of the sergeant.

Unfortunately, when the step size and speed are corrected to where the sergeant
moves smoothly, at the correct speed for CMAT, it dramatically changes the movement
pattern of the bot, making it unusable. The movement pattern becomes very small,
making it easier to hit from medium range, and the bot fires almost constantly,
inflicting damage at too constant a rate.

So yes, the frameskipping can be fixed, but no, the result is not usable in CMAT.
The current settings of the bot appear to be as optimal as dehacked can go. Using a
source port instead of a dehacked patch to adjust the bot in a more complete way
is not feasible at this time due to mouse handling differences in the ports, but
this may change in the future.


Q. The bot doesn't move like a person would, so isn't it useless?

A. Experience so far suggests otherwise. Players who are known to be superior combat
shotgun handlers (and are not uncommonly disturbed by CMAT's need to record)
demonstrate consistently above average CMAT ratings within a relatively short
period of time. In a test case, a player working consistently with the bot over a
period of several months resulted in increased combat shotgun abilities, both
in real deathmatch and as demonstrated in CMAT ratings. Also, it is proven that aim
abilities that work well in deathmatch can develop independent of deathmatch
(a good example of this would be Henning Skogsto, whose aim developed primarily
in single player doom, and whose deathmatch aim abilities are awesome).


Q. Why doesn't the CMAT take into account the number of times you miss, like the
prior version of CMAT did?

A. It does -- but indirectly. Killing the bot in a shorter period of time means that
you probably missed less often. This way, you are penalized the same for either not
firing at all, or missing, and this solved a large balance issue and proved to be a
superior rating mechanism.


Q. Can I use the bot in other maps?

A. It's physically possible, but CMAT ratings will not be correct when other
maps are used. Also, you can expect the bot to run through walls and even, out of
the map occasionally, in maps that are not designed to take its large step size into
account like the included cmat.wad. cmat.wad has special double-deep walls to prevent


Q. I just tried it, and the bot killed me, and I kick ass with the combat shotgun, so
now I'm mad and I don't want to play it anymore.

A. It kills virtually everyone the first time, it's just like anything else that's new.
Read the "beginning tips" section below if you want help.


Q: What is option 6, "To watch a "doomgod ladder" recording (named mydemo.lmp)",
in the Main Menu?

A: That's an option that enables you to watch a recording that was made with a
different bot. The bot included with this cmat.zip zipfile only accurately compares
players who rate from 0 to around 200. Players who consistantly rate above 200
can compete with one another using a different, 'doomgod' version of the CMAT
bot and its rating program. Due to issues with beginner CMAT players attempting
to use the Doomgod version of the CMAT bot and becoming rapidly discouraged,
the Doomgod version of the CMAT package is no longer in public distribution. However,
we decided to leave the ability to watch 'doomgod' recordings in place.

The 'doomgod' version of the CMAT bot can privately be made available by the authors
to players who can demonstrate an average standard CMAT rating of 200 or higher.

Q: What are all those extra accuracy statistics about?

A: The extra aim statistics are there to support different kinds of ladders, and may be
useful in providing extra insight into different players' stylistic differences.

The statistics are:

Aim Accuracy is the percentage of shots that hit. Essentially, what percentage of
the time do you miss vs. hit when you fire at the bot?

Shot Accuracy is the average percent of pellets that hit, taking into account ONLY
the shots that actually hit the bot. Complete misses are not considered when
calculating this statistic. Essentially, when you hit, how hard do you hit?

Real Accuracy is the average percent of pellets that hit per shot, including data
from all hits and misses. Essentially, how much of your total SSG power is wasted
vs. doing damage?


***************************
* Tips for beginning CMAT *
***************************

(1) It is critical to play with your status bar visible so that you can see your health,
even if you do not use a status bar in deathmatch.

(2) You start with 100 health and 100 armor. The stimpacks and green armor on the map
have been placed there for a reason, so don't forget to use them. Picking up the armor
when your initial armor goes down to 50% is a good policy. It will skew your CMAT
rating down if you do not pick up the green armor at a reasonable time.

(3) The firstmost important thing is killing the bot, no matter how long it takes.
You cannot get a CMAT rating unless the bot is killed. The secondmost important
thing is killing it quickly, because the time you take is the biggest factor in
calculating your CMAT rating. Actively and consistently engaging the bot is the way
to get good ratings!

(4) The bot can do 20% damage in a good shot, so do not let your health hang in the
20% range for very long.

(4) Try downloading an example demo by a high rated player, and observe how the bot
is handled.

(5) Don't hit your [ESC] key while making CMAT recordings, it will make the ratings
generator report incorrectly. Adjust your volume, etc in normal doom2.exe instead.


*********************************************
* CMAT Trivia: How the rating is calculated *
*********************************************

The automated CMAT calculator automatically generates the core CMAT rating when
run against a valid CMAT generated recording. CMAT can also be calculated by hand,
but it gets tedious and requires demo editing tools such as LMPC.

Calculating the CMAT Version 2 requires the recording to be examined and the
following statistics to be gathered:

The length of the bot fight, starting from the first gametic of the round, and ending
at the last FireWeapon gametic (or, the death of the bot). We call this the "Duration
of Engagement".

How many hits the player scored on the bot.

How many misses the player had while engaging the bot.

How many stimpacks were remaining at the end of the demo, assuming the player has picked up
enough stims to be at 100% at exit.


The normal ladder rating is determined like this:

The startpoint for the rating is 300.

If the Duration of Engagement is less than 34 seconds, 4 points are added for every
second that it is less than 34 seconds. If the Duration of Engagement is longer than
34 seconds, 4 points are subtracted for every second beyond 34. If the Duration of
Engagement is exactly 34 seconds, we do not add or subtract at this step, keeping
300.

If the number of hits scored against the bot is less than 30, we add 4 points for
each hit that was less than 30.

We add 4 points for every stimpack that remains unused at the end of the round,
with the player having picked up enough stimpacks to exit the map at 100% health.

The resulting number is the Core CMAT rating using the Version 2 calculation method.
The original CMAT Version 1 used a completely different rating system, and is no
longer considered valid.


The Doomgod rating is calculated differently, and it uses a different bot. This bot
moves faster, fires more frequently, and has somewhat lower hitpoints (it has
2700 HP, as opposed with the standard ladder bot which has 3500).


startpoint for Doomgod CMAT rating: 250

If the duration of engagement was above 40 seconds, 10.5 gets subtracted for every
second, starting with second# 41. If the duration of engagement was less than 40,
10.5 gets added, starting with second# 39. If the duration was 40, we leave the
250 in place.

If the number of hits was less than 25, 5 points gets added for every hit that was
less than 25. For example, 24 hits get 5 points added, 23 hits gets 10 points added,
and so on.

Each stimpack remaining, after the player has 100% health, will get 5 points added.