[freeciv-ai] Re: patches list
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, 15 Apr 2002, Mike Kaufman wrote:
> OK, I can see that H_EXPERIMENTAL is a good compromise until we can get to
> separate AI's running aginst each other. Get me the patch, and I'll take a
> look.
Attached. Unchanged from previously posted version. Should be trivial.
> diplomats. If you can do it today (or tomorrow) otherwise the weekend.
Attached. Also unchanged. Not tried to apply this to most recent cvs.
Yours,
Per
"Treason doth never prosper: what's the reason?
Why, if it prosper, none dare call it treason."
-- Sir John Harrington (1561-1612)
-- Binary/unsupported file stripped by Ecartis --
-- Type: APPLICATION/octet-stream
-- File: activediplomats6.patch.gz
-- Attached file included as plaintext by Ecartis --
-- File: exp.patch
--- freeciv/common/player.h Tue Mar 26 01:34:23 2002
+++ freeciv-phased/common/player.h Fri Apr 5 22:12:36 2002
@@ -46,7 +46,7 @@
H_CITYBUILDINGS=8, /* doesn't know what buildings are in enemy cities */
H_CITYUNITS=16, /* doesn't know what units are in enemy cities */
H_STACKS=32, /* doesn't know what units are in stacks */
- H_VETERAN=64, /* doesn't know veteran status of enemy units */
+ H_EXPERIMENTAL=64, /* enable experimental AI features (for testing) */
H_SUB=128, /* doesn't know where subs may be lurking */
/* below this point are milder handicaps that I can actually implement --
Syela */
H_RATES=256, /* can't set its rates beyond government limits */
--- freeciv/server/stdinhand.c Fri Apr 5 16:12:30 2002
+++ freeciv-phased/server/stdinhand.c Fri Apr 5 22:11:35 2002
@@ -892,6 +892,7 @@
CMD_EASY,
CMD_NORMAL,
CMD_HARD,
+ CMD_EXPERIMENTAL,
CMD_CMDLEVEL,
CMD_FIRSTLEVEL,
@@ -1072,6 +1073,16 @@
"sets the default level for any new AI players to 'hard'. With an "
"argument, sets the skill level for that player only.")
},
+ {"experimental", ALLOW_CTRL,
+ /* TRANS: translate text between <> only */
+ N_("experimental\n"
+ "experimental <player-name>"),
+ N_("Set one or all AI players to 'experimental'."),
+ N_("With no arguments, sets all AI players to skill 'experimental', and "
+ "sets the default level for any new AI players to this. With an "
+ "argument, sets the skill level for that player only. THIS IS ONLY "
+ "FOR TESTING!")
+ },
{"cmdlevel", ALLOW_HACK, /* confusing to leave this at ALLOW_CTRL */
/* TRANS: translate text between <> only */
N_("cmdlevel\n"
@@ -1521,7 +1532,7 @@
{
const char *nm[11] = { "UNUSED", "UNKNOWN", "UNKNOWN", "easy",
"UNKNOWN", "normal", "UNKNOWN", "hard",
- "UNKNOWN", "UNKNOWN", "UNKNOWN" };
+ "UNKNOWN", "UNKNOWN", "experimental" };
assert(level>0 && level<=10);
return nm[level];
@@ -1535,14 +1546,14 @@
int h[11] = { -1,
H_NONE,
H_NONE,
- H_RATES | H_TARGETS | H_HUTS,
+ H_RATES | H_TARGETS | H_HUTS | H_DEFENSIVE,
H_NONE,
H_RATES | H_TARGETS | H_HUTS,
H_NONE,
H_NONE,
H_NONE,
H_NONE,
- H_NONE,
+ H_EXPERIMENTAL,
};
assert(level>0 && level<=10);
@@ -1818,8 +1829,9 @@
fprintf(script_file, "%s\n",
(game.skill_level <= 3) ? "easy" :
- (game.skill_level >= 6) ? "hard" :
- "normal");
+ (game.skill_level == 5) ? "medium" :
+ (game.skill_level < 10) ? "hard" :
+ "experimental");
if (*srvarg.metaserver_addr != '\0' &&
((0 != strcmp(srvarg.metaserver_addr, DEFAULT_META_SERVER_ADDR)) ||
@@ -2421,13 +2433,18 @@
{
enum m_pre_result match_result;
struct player *pplayer;
- enum command_id cmd = (level <= 3) ? CMD_EASY :
- (level >= 6) ? CMD_HARD :
- CMD_NORMAL;
- /* kludge - these commands ought to be 'set' options really - rp */
+ /* kludge - these commands ought to be 'set' options really - rp */
+ enum command_id cmd;
assert(level > 0 && level < 11);
+ switch(level) {
+ case 3 : cmd=CMD_EASY; break;
+ case 5 : cmd=CMD_NORMAL; break;
+ case 7 : cmd=CMD_HARD; break;
+ case 10 : cmd=CMD_EXPERIMENTAL; break;
+ }
+
pplayer=find_player_by_name_prefix(name, &match_result);
if (pplayer) {
@@ -2921,6 +2938,9 @@
case CMD_HARD:
set_ai_level(caller, arg, 7);
break;
+ case CMD_EXPERIMENTAL:
+ set_ai_level(caller, arg, 10);
+ break;
case CMD_QUIT:
quit_game(caller);
break;
@@ -3653,6 +3673,7 @@
CMD_EASY,
CMD_NORMAL,
CMD_HARD,
+ CMD_EXPERIMENTAL,
CMD_REMOVE,
-1
};
- [freeciv-ai] Re: patches list, (continued)
- [freeciv-ai] Re: patches list, Per I Mathisen, 2002/04/15
- [freeciv-ai] Re: patches list, Mike Kaufman, 2002/04/15
- [freeciv-ai] Re: patches list, Gregory Berkolaiko, 2002/04/15
- [freeciv-ai] Re: patches list, Mike Kaufman, 2002/04/15
- [freeciv-ai] Re: patches list,
Per I Mathisen <=
- [freeciv-ai] Re: patches list, Per I Mathisen, 2002/04/15
- [freeciv-ai] Re: patches list, Gregory Berkolaiko, 2002/04/15
- [freeciv-ai] Re: patches list, Raimar Falke, 2002/04/15
- [freeciv-ai] Re: patches list, Raahul Kumar, 2002/04/16
- [freeciv-ai] Re: patches list, Gregory Berkolaiko, 2002/04/15
- [freeciv-ai] Review od Active Diplomats patch., Gregory Berkolaiko, 2002/04/16
- [freeciv-ai] Re: Review od Active Diplomats patch., Per I Mathisen, 2002/04/16
- [freeciv-ai] Re: Review of Active Diplomats patch., Per I Mathisen, 2002/04/23
[freeciv-ai] Re: patches list, Gregory Berkolaiko, 2002/04/15
|
|