Aivolution AI:

-AI became more talkative
-more phrases can be recognized and used as commands
-cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4158 4a71c877-e1ca-e34f-864e-861f7616d084
master
Roman C 2008-03-19 21:02:03 +00:00
parent 53ccf20390
commit cfea441525
3 changed files with 448 additions and 315 deletions

File diff suppressed because it is too large Load Diff

View File

@ -84,6 +84,7 @@ static SDWORD playerIndex;
"after" { return _T_AFTER; }
"ally" { return _T_ALLY; }
"am" { return _T_AM; }
"an" { return _T_AN; }
"and" { return _T_AND; }
"any" { return _T_ANY; }
"attack" { return _T_ATTACK; }
@ -97,6 +98,7 @@ static SDWORD playerIndex;
"do" { return _T_DO; }
"drop" { return _T_DROP; }
"fine" { return _T_FINE; }
"force" { return _T_FORCE; }
"get" { return _T_GET; }
"getting" { return _T_GETTING; }
"go" { return _T_GO; }
@ -113,6 +115,7 @@ static SDWORD playerIndex;
"lassat" { return _T_LASSAT; }
"let's" { return _T_LETS; }
"me" { return _T_ME; }
"more" { return _T_MORE; }
"need" { return _T_NEED; }
"no" { return _T_NO; }
"now" { return _T_NOW; }
@ -123,6 +126,8 @@ static SDWORD playerIndex;
"power" { return _T_POWER; }
"pumping" { return _T_PUMPING; }
"put" { return _T_PUT; }
"ready" { return _T_READY; }
"require" { return _T_REQUIRE; }
"roger" { return _T_ROGER; }
"see" { return _T_SEE; }
"some" { return _T_SOME; }
@ -131,6 +136,7 @@ static SDWORD playerIndex;
"sure" { return _T_SURE; }
"thank you" { return _T_THANK_YOU; }
"thanks" { return _T_THANKS; }
"the" { return _T_THE; }
"u" { return _T_U; }
"units" { return _T_UNITS; }
"vtols" { return _T_VTOLS; }
@ -138,6 +144,7 @@ static SDWORD playerIndex;
"where" { return _T_WHERE; }
"yea" { return _T_YEA; }
"yeah" { return _T_YEAH; }
"yep" { return _T_YEP; }
"yes" { return _T_YES; }
"you" { return _T_YOU; }

View File

@ -203,6 +203,7 @@ static void chat_reset_command(SDWORD cmdIndex)
%token _T_AFTER
%token _T_ALLY
%token _T_AM
%token _T_AN
%token _T_AND
%token _T_ANY
%token _T_ATTACK
@ -216,6 +217,7 @@ static void chat_reset_command(SDWORD cmdIndex)
%token _T_DO
%token _T_DROP
%token _T_FINE
%token _T_FORCE
%token _T_GET
%token _T_GETTING
%token _T_GO
@ -232,6 +234,7 @@ static void chat_reset_command(SDWORD cmdIndex)
%token _T_LASSAT
%token _T_LETS
%token _T_ME
%token _T_MORE
%token _T_NEED
%token _T_NO
%token _T_NOW
@ -242,6 +245,8 @@ static void chat_reset_command(SDWORD cmdIndex)
%token _T_POWER
%token _T_PUMPING
%token _T_PUT
%token _T_READY
%token _T_REQUIRE
%token _T_ROGER
%token _T_SEE
%token _T_SOME
@ -250,6 +255,7 @@ static void chat_reset_command(SDWORD cmdIndex)
%token _T_SURE
%token _T_THANK_YOU
%token _T_THANKS
%token _T_THE
%token _T_U
%token _T_UNITS
%token _T_VTOLS
@ -257,6 +263,7 @@ static void chat_reset_command(SDWORD cmdIndex)
%token _T_WHERE
%token _T_YEA
%token _T_YEAH
%token _T_YEP
%token _T_YES
%token _T_YOU
%token _T_EOF 0
@ -417,6 +424,8 @@ R_PLAYER_POSSESSION: R_PLAYER R_POSSESSION /* blue's */
*/
R_A_OR_EMPTY: /* Empty */
| _T_A
| _T_AN
| _T_THE
;
/* Punctuation mark */
@ -469,7 +478,7 @@ R_INITIATE_ATTACK: _T_ATTACK
R_PUT_DOWN: _T_PUT | _T_DROP | _T_PLACE; /* put */
R_INCREASING_NUMBER: _T_PUMPING /* pumping/getting */
R_CONSTRUCTING: _T_PUMPING /* pumping/getting */
| _T_GETTING
| _T_BUILDING
;
@ -507,6 +516,7 @@ R_DO_YOU_HAVE_ANY: R_DO_YOU R_POSSESSION_Q R_QUANTITY
R_YES_FORMS: _T_YES
| _T_YEA
| _T_YEAH
| _T_YEP
;
R_CONFIDENCE_EXPRESSION: _T_SURE
@ -523,6 +533,12 @@ R_AFFIRMATIVE_FORMS: R_AGREEMENT_EXPRESSION
| _T_ROGER /* roger */
| _T_AFFIRMATIVE
;
/* Need */
R_NEED: _T_NEED
| _T_REQUIRE
;
/*******************************************/
/* FINAL RULES, SHOULD BE PART OF R_PHRASE */
/*******************************************/
@ -536,7 +552,10 @@ R_ALLY_OFFER: _T_ALLY _T_ME R_EOS /* ally me */
/* Chech if player is willing
* to initiate some actions
*/
R_ASK_READINESS: _T_GO _T_QM; /* go? */
R_ASK_READINESS: _T_GO _T_QM /* go? */
| _T_READY R_EOS /* ready! */
| _T_IM _T_READY R_EOS /* I'm ready! */
;
/* Tell to start some action */
R_INITIATE_ACTION: _T_GO R_EOD; /* go!! */
@ -550,8 +569,16 @@ R_MEET_CENTER: _T_GO _T_CENTER R_EOS; /* go center */
/* Ask for the current status */
R_ASK_STATUS: _T_STATUS R_EOS; /* status? */
/* Units */
R_UNIT_ARMY: R_A_OR_EMPTY _T_FORCE
| R_A_OR_EMPTY _T_ARMY
;
/* Player is building units */
R_BUILDING_UNITS: R_INCREASING_NUMBER _T_UNITS R_EOD; /* pumping units */
R_BUILDING_UNITS: R_CONSTRUCTING _T_UNITS R_EOD /* pumping units */
| R_CONSTRUCTING _T_MORE _T_UNITS R_EOD /* pumping more units */
| R_CONSTRUCTING R_UNIT_ARMY R_EOD /* building army */
;
/* Stop command */
R_STOP: _T_STOP R_EOD; /* stop */
@ -561,9 +588,10 @@ R_WONDER_IF_HAVE_POWER: R_DO_YOU_HAVE_ANY _T_POWER R_EOQ; /* do you have p
/* Ask for help */
R_DEMAND_HELP: _T_HELP _T_ME R_EOS /* help me!!!!! */
| _T_HELP R_EOS /* help!?!? */
| _T_NEED _T_HELP R_EOS /* need help */
| _T_I R_DEMAND_HELP /* I need help */
| _T_HELP R_EOS /* help!?!? */
| _T_I R_DEMAND_HELP /* I need help */
| R_NEED _T_HELP R_EOS /* need help */
| R_NEED R_QUANTITY _T_HELP R_EOS /* need some help */
;
R_GRATITUDE: _T_THANK_YOU