Thread Tools
Old August 2, 2001, 10:33   #1
Urban Ranger
NationStatesApolyton Storywriters' GuildNever Ending Stories
Deity
 
Urban Ranger's Avatar
 
Local Time: 20:01
Local Date: October 31, 2010
Join Date: May 1999
Location: The City State of Noosphere, CPA special envoy
Posts: 14,606
User programmable AI
Now that would be nice, since the AI can be improved continuously.
__________________
(\__/) 07/07/1937 - Never forget
(='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
(")_(") "Starting the fire from within."
Urban Ranger is offline  
Old August 2, 2001, 10:40   #2
loinburger
Apolytoners Hall of Fame
Emperor
 
Local Time: 08:01
Local Date: October 31, 2010
Join Date: Jul 1999
Posts: 5,605
Do you mean that Firaxis would create an AI.txt file that the user could modify, that Firaxis would create an AI metalanguage that the user could program in, that the user could write his/her own C++ (or whatever) code for the AI, or something else?
__________________
"For just twenty cents a day, we'll moisten your dreams with man urine." -Space Ghost
loinburger is offline  
Old August 2, 2001, 10:46   #3
Urban Ranger
NationStatesApolyton Storywriters' GuildNever Ending Stories
Deity
 
Urban Ranger's Avatar
 
Local Time: 20:01
Local Date: October 31, 2010
Join Date: May 1999
Location: The City State of Noosphere, CPA special envoy
Posts: 14,606
Well, what do you think? What would be the best implementation? I prefer a set of files containing the rules, since doing real programming is daunting to your average player.
__________________
(\__/) 07/07/1937 - Never forget
(='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
(")_(") "Starting the fire from within."
Urban Ranger is offline  
Old August 2, 2001, 10:55   #4
Grumbold
Emperor
 
Grumbold's Avatar
 
Local Time: 13:01
Local Date: October 31, 2010
Join Date: Mar 2000
Location: London, UK
Posts: 3,732
Firaxis could do a lot worse than implement SLIC (the CtP/2 modifiable code). While the average gamer will leave it well alone and rely only on some easily modifiable text values, it would guarantee the hardcore modders would eventually repair any AI loopholes that slip past the Firaxians.
__________________
To doubt everything or to believe everything are two equally convenient solutions; both dispense with the necessity of reflection. H.Poincare
Grumbold is offline  
Old August 2, 2001, 10:56   #5
Shadowstrike
Emperor
 
Shadowstrike's Avatar
 
Local Time: 07:01
Local Date: October 31, 2010
Join Date: Jul 2000
Location: The Glorious Land of Canada
Posts: 3,234
Civ has had a long tradition of flexibility. This would vastly improve the situation of those who find themselves unsatisfied with teh game and increase its lifespan. Of course this would als o put a lot of work on the Firaxis programmers.
__________________
*grumbles about work*
Shadowstrike is offline  
Old August 2, 2001, 10:56   #6
DaveV
Apolytoners Hall of Fame
King
 
DaveV's Avatar
 
Local Time: 08:01
Local Date: October 31, 2010
Join Date: Dec 1969
Location: USA - EDT (GMT-5)
Posts: 2,051
Amen! I have been singing this song since the early days of the list. I agree that it would make things easier for users and scenario writers if there's a way to modify AI behavior by changing a text file. But that doesn't necessarily preclude also giving the real hackers the ability to make fundamental changes in the code.

I'd love it if Firaxis released their AI code as a bunch of DLLs, and gave documention for each routine. The danger in this approach is that loading a modified DLL could really mess up your computer through incompetent or malicious programming, so you'd better trust whoever made the mods. On the other hand, this would give the public a lot more access to the logic of the AI routines, and would allow aftermarket users to design a text file based AI interface if Firaxis didn't provide it.
DaveV is offline  
Old August 2, 2001, 10:59   #7
Solver
lifer
Civilization IV CreatorsAge of Nations TeamApolytoners Hall of FamePolyCast TeamBtS Tri-LeagueThe Courts of Candle'BreC4WDG Team Apolyton
Deity
 
Solver's Avatar
 
Local Time: 15:01
Local Date: October 31, 2010
Join Date: Sep 2000
Location: Latvia, Riga
Posts: 18,355
That has been done in AoE 2, and result is some really good scripts by users.
__________________
Solver, WePlayCiv Co-Administrator
Contact: solver-at-weplayciv-dot-com
I can kill you whenever I please... but not today. - The Cigarette Smoking Man
Solver is offline  
Old August 2, 2001, 11:08   #8
Urban Ranger
NationStatesApolyton Storywriters' GuildNever Ending Stories
Deity
 
Urban Ranger's Avatar
 
Local Time: 20:01
Local Date: October 31, 2010
Join Date: May 1999
Location: The City State of Noosphere, CPA special envoy
Posts: 14,606
Solver,

How's it done in AoE2? Any details?
__________________
(\__/) 07/07/1937 - Never forget
(='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
(")_(") "Starting the fire from within."
Urban Ranger is offline  
Old August 2, 2001, 12:55   #9
DarkCloud
staff
NationStatesAlpha Centauri Democracy GameCivilization II Democracy GameInterSite Democracy Game: Apolyton TeamSpanish CiversCiv4 InterSite DG: Apolyton TeamPolyCast TeamApolyton Storywriters' GuildAge of Nations TeamApolytoners Hall of Fame
 
DarkCloud's Avatar
 
Local Time: 12:01
Local Date: October 31, 2010
Join Date: Jul 2000
Location: Deity of Lists
Posts: 11,873
From what "id" did, they have been letting the Users program it for years.

It would be nice to see what people do with the AI's and how they improve Civ!
__________________
-->Visit CGN!
-->"Production! More Production! Production creates Wealth! Production creates more Jobs!"-Wendell Willkie -1944
DarkCloud is offline  
Old August 3, 2001, 00:34   #10
old timer
Settler
 
old timer's Avatar
 
Local Time: 04:01
Local Date: October 31, 2010
Join Date: May 2001
Posts: 9
Quote:
Originally posted by Urban Ranger
Solver,

How's it done in AoE2? Any details?
In AOE2, Ensemble Studios provided a scripting language which was processed by the game engine in real time. You could actually debug your script by running the game with the computer opponent set to use your script.

Unfortunately, the AOE2 scripting language was limited to strategic decisions such as what to build, how much, and when. You could not tell the AI how to attack or what units to attack with, but you could tell it how many troops to send.

I wrote a large script for AOE2 which was used by many people and I intend to mod the AI for Civ III as well, if Firaxis make it worthwile (in other words, give us enough power - more than just text files please!)
old timer is offline  
Old August 3, 2001, 02:36   #11
Zanzin
Prince
 
Zanzin's Avatar
 
Local Time: 22:01
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Sydney, Australia
Posts: 441
BUT -

If firaxis was implementing a user programmable AI (and it would be too late to add now, so it would have been something decided on early in development) - if they did, I hope they wouldn't/haven't fallen into the trap that Activison did - "oh well, everything's customisable.....so we'll let the users actually finish the game for us" - as was the case with CTP2, and to a lesser degree, CTP1.
Zanzin is offline  
Old August 3, 2001, 05:22   #12
TechWins
King
 
TechWins's Avatar
 
Local Time: 05:01
Local Date: October 31, 2010
Join Date: Apr 2001
Location: Arizona
Posts: 1,747
Quote:
I hope they wouldn't/haven't fallen into the trap that Activison did - "oh well, everything's customisable.....so we'll let the users actually finish the game for us"
That's the same point I've been trying to make in a seperate thread. No matter how customizable the game is it should still be sent as a good game.

I would also like the to have an easy to use User Programmable AI.
__________________
However, it is difficult to believe that 2 times 2 does not equal 4; does that make it true? On the other hand, is it really so difficult simply to accept everything that one has been brought up on and that has gradually struck deep roots – what is considered truth in the circle of moreover, really comforts and elevates man? Is that more difficult than to strike new paths, fighting the habitual, experiencing the insecurity of independence and the frequent wavering of one’s feelings and even one’s conscience, proceeding often without any consolation, but ever with the eternal goal of the true, the beautiful, and the good? - F.N.
TechWins is offline  
Old August 3, 2001, 06:05   #13
TechWins
King
 
TechWins's Avatar
 
Local Time: 05:01
Local Date: October 31, 2010
Join Date: Apr 2001
Location: Arizona
Posts: 1,747
Here's a quote from Firaxis about the customization "More powerful and intuitive customization tools.". I'm not sure how old this quote is, though.

the link to that page is-
http://www.firaxis.com/civ3/faq-general.cfm

So maybe a user programmable AI isn't so far fetched after all.
__________________
However, it is difficult to believe that 2 times 2 does not equal 4; does that make it true? On the other hand, is it really so difficult simply to accept everything that one has been brought up on and that has gradually struck deep roots – what is considered truth in the circle of moreover, really comforts and elevates man? Is that more difficult than to strike new paths, fighting the habitual, experiencing the insecurity of independence and the frequent wavering of one’s feelings and even one’s conscience, proceeding often without any consolation, but ever with the eternal goal of the true, the beautiful, and the good? - F.N.
TechWins is offline  
Old August 3, 2001, 06:19   #14
Provost Harrison
Apolytoners Hall of FameCivilization IV PBEMPolyCast Team
Deity
 
Provost Harrison's Avatar
 
Local Time: 13:01
Local Date: October 31, 2010
Join Date: Feb 2000
Location: Germans own my soul.
Posts: 14,861
A customisable AI would be quite good for generating different civilisations. Perhaps each one has it's own nuances which determine how the civilisation will react in quite specific circumstances. Perhaps it will be possible to generate your own list of criteria and modify them as necessary, ie, for your own scenario or civ.

Something more complicated than the civ2 model where there were only three broad categories: friendly/neutral/aggressive, perfectionist/neutral/expansionistic, civilised/neutral/militaristic. I would like to see these attributes expanded on dramatically...
__________________
Speaking of Erith:

"It's not twinned with anywhere, but it does have a suicide pact with Dagenham" - Linda Smith
Provost Harrison is offline  
Old August 3, 2001, 06:27   #15
fittstim
Warlord
 
fittstim's Avatar
 
Local Time: 13:01
Local Date: October 31, 2010
Join Date: Jul 2001
Location: Stockholm, Sweden
Posts: 265
Sounds great but how can you implement programmable AI???

In the AoE example, telling the computer to send a certain number of troops to a particular place is fine but not really satisfying. I crave an AI that actually does things intelligently and efficiently.

No more building stupid upgrades (Port Facility?!?) when the city lacks a granary!!!
fittstim is offline  
Old August 3, 2001, 07:02   #16
Grumbold
Emperor
 
Grumbold's Avatar
 
Local Time: 13:01
Local Date: October 31, 2010
Join Date: Mar 2000
Location: London, UK
Posts: 3,732
Quote:
Originally posted by fittstim
Sounds great but how can you implement programmable AI???

In the AoE example, telling the computer to send a certain number of troops to a particular place is fine but not really satisfying. I crave an AI that actually does things intelligently and efficiently.
It is possible with the SLIC code Activision designed. The system is complex but it works.
__________________
To doubt everything or to believe everything are two equally convenient solutions; both dispense with the necessity of reflection. H.Poincare
Grumbold is offline  
Old August 3, 2001, 07:27   #17
Solver
lifer
Civilization IV CreatorsAge of Nations TeamApolytoners Hall of FamePolyCast TeamBtS Tri-LeagueThe Courts of Candle'BreC4WDG Team Apolyton
Deity
 
Solver's Avatar
 
Local Time: 15:01
Local Date: October 31, 2010
Join Date: Sep 2000
Location: Latvia, Riga
Posts: 18,355
AoE 2 has an AoE 2 AI script language.
For example:
defrule (
(unit-type-count paladin == 50)
=>
(attack-now)
)

Once the PC got 50 Paladins, it will attack. Or:
defrule (
(unit-type-count villager == 25)
(building-type-count mill == 1)
(building-type-count lumber-camp ==1)
(food-amount greater-or-equal 500)
=>
(research ri-feudal-age)
)

Once the AI got 25 villagers, a Mill, a lumber camp, and at least 500 food, it will start advancing to the Feudal Age.
__________________
Solver, WePlayCiv Co-Administrator
Contact: solver-at-weplayciv-dot-com
I can kill you whenever I please... but not today. - The Cigarette Smoking Man
Solver is offline  
Old August 3, 2001, 08:45   #18
Eli
Civ4 SP Democracy GamePtWDG Vox ControliC4DG VoxCiv4 InterSite DG: Apolyton Team
Emperor
 
Eli's Avatar
 
Local Time: 15:01
Local Date: October 31, 2010
Join Date: Jul 2000
Location: Israel
Posts: 6,480
If they implement this then maybe, by the time Civ4 is out, we will be able to create an AI that can actually beat a human player once in a while.
__________________
"Beware of he who would deny you access to information, for in his heart he dreams himself your master" - Commissioner Pravin Lal.
Eli is offline  
Old August 3, 2001, 08:49   #19
Solver
lifer
Civilization IV CreatorsAge of Nations TeamApolytoners Hall of FamePolyCast TeamBtS Tri-LeagueThe Courts of Candle'BreC4WDG Team Apolyton
Deity
 
Solver's Avatar
 
Local Time: 15:01
Local Date: October 31, 2010
Join Date: Sep 2000
Location: Latvia, Riga
Posts: 18,355
Actually, the Ai can beat you time to time. That is when you forget to build Settlers, and only have your army consist of one Tank .
__________________
Solver, WePlayCiv Co-Administrator
Contact: solver-at-weplayciv-dot-com
I can kill you whenever I please... but not today. - The Cigarette Smoking Man
Solver is offline  
Old August 3, 2001, 09:02   #20
Eli
Civ4 SP Democracy GamePtWDG Vox ControliC4DG VoxCiv4 InterSite DG: Apolyton Team
Emperor
 
Eli's Avatar
 
Local Time: 15:01
Local Date: October 31, 2010
Join Date: Jul 2000
Location: Israel
Posts: 6,480
Hmm... If the start is in 4000BC with one tank(cheat mode)... It's possible to win, especially if you're on one big continent with the other civs.

You dont even need a tank for that.
__________________
"Beware of he who would deny you access to information, for in his heart he dreams himself your master" - Commissioner Pravin Lal.
Eli is offline  
Old August 3, 2001, 09:05   #21
Solver
lifer
Civilization IV CreatorsAge of Nations TeamApolytoners Hall of FamePolyCast TeamBtS Tri-LeagueThe Courts of Candle'BreC4WDG Team Apolyton
Deity
 
Solver's Avatar
 
Local Time: 15:01
Local Date: October 31, 2010
Join Date: Sep 2000
Location: Latvia, Riga
Posts: 18,355
In Civ 1, that wouldn't help, for it was easy to lose the Tank to a Militia.
__________________
Solver, WePlayCiv Co-Administrator
Contact: solver-at-weplayciv-dot-com
I can kill you whenever I please... but not today. - The Cigarette Smoking Man
Solver is offline  
Old August 3, 2001, 10:09   #22
loinburger
Apolytoners Hall of Fame
Emperor
 
Local Time: 08:01
Local Date: October 31, 2010
Join Date: Jul 1999
Posts: 5,605
It would be nice if Civ III had some kind of scripting language for gamers to generate rules with, but I would prefer if Firaxis released patches from time to time that impoved the game's AI.
__________________
"For just twenty cents a day, we'll moisten your dreams with man urine." -Space Ghost
loinburger is offline  
Old August 3, 2001, 10:11   #23
Solver
lifer
Civilization IV CreatorsAge of Nations TeamApolytoners Hall of FamePolyCast TeamBtS Tri-LeagueThe Courts of Candle'BreC4WDG Team Apolyton
Deity
 
Solver's Avatar
 
Local Time: 15:01
Local Date: October 31, 2010
Join Date: Sep 2000
Location: Latvia, Riga
Posts: 18,355
I'd prefer both. I think there will be something similar to SLIC.
__________________
Solver, WePlayCiv Co-Administrator
Contact: solver-at-weplayciv-dot-com
I can kill you whenever I please... but not today. - The Cigarette Smoking Man
Solver is offline  
Old August 3, 2001, 11:10   #24
Urban Ranger
NationStatesApolyton Storywriters' GuildNever Ending Stories
Deity
 
Urban Ranger's Avatar
 
Local Time: 20:01
Local Date: October 31, 2010
Join Date: May 1999
Location: The City State of Noosphere, CPA special envoy
Posts: 14,606
Since I don't know what SLIC is, I'm assuming it's some kind of scripting language built into CtP. That's fine and dandy to me, so I can hack the computer players to do something actually intelligent

As with Solver I would prefer a programmable AI together with patches, the reason being that it is very likely to have more than just the AI to fix
__________________
(\__/) 07/07/1937 - Never forget
(='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
(")_(") "Starting the fire from within."
Urban Ranger is offline  
Old August 3, 2001, 11:52   #25
Solver
lifer
Civilization IV CreatorsAge of Nations TeamApolytoners Hall of FamePolyCast TeamBtS Tri-LeagueThe Courts of Candle'BreC4WDG Team Apolyton
Deity
 
Solver's Avatar
 
Local Time: 15:01
Local Date: October 31, 2010
Join Date: Sep 2000
Location: Latvia, Riga
Posts: 18,355
Quote:
Originally posted by Urban Ranger
Since I don't know what SLIC is, I'm assuming it's some kind of scripting language built into CtP. That's fine and dandy to me, so I can hack the computer players to do something actually intelligent
Yes, SLIC is a C like language that you can use to modify CtP/CtP 2. AI, improvements, triggers, etc.
__________________
Solver, WePlayCiv Co-Administrator
Contact: solver-at-weplayciv-dot-com
I can kill you whenever I please... but not today. - The Cigarette Smoking Man
Solver is offline  
Old August 3, 2001, 11:54   #26
LaRusso
King
 
LaRusso's Avatar
 
Local Time: 14:01
Local Date: October 31, 2010
Join Date: May 2001
Location: appendix of Europe
Posts: 1,634
great. so you pay 50 usd so that you can work a bit more on things they could not be arsed to do....
LaRusso is offline  
Old August 3, 2001, 12:04   #27
ajbera
Prince
 
ajbera's Avatar
 
Local Time: 12:01
Local Date: October 31, 2010
Join Date: Apr 1999
Location: of the Cookieville Minimum Security Orphanarium
Posts: 428
This is something I've musing over for a while now.

I don't know how many of you bothered with CtP/CtP2, but one of that game's strengths was the readily accessible text files. Just about everything was modifiable. Now, in the case of CtP, WesW and companies' tweaking of the files helped make the game better. For CtP2, the tweaking was necessary to repair many aspects of the game.

However, WesW & pals didn't stop there. After drastically improving the AI and fixing several other features, they then added to the game: the units from the original CtP that didn't make it into the sequel were added, as were several other units that weren't in either original game; the tech tree was made more accurate; a feature was implemented whereby AI personality would shift periodically, simulating new leaders with new outlooks; and work is underway to include random (and preventable) natural disasters, and the city expansion effect, an attempt to simulate suburban expansion and urban sprawl.

My point is: they didn't just repair what needed to be fixed; they radically altered (and by near universal consensus, improved) a game released by a major publisher.

Now, I hope that Civ3 is near-perfect when it's released (and I have very high hopes for it, as the only released piece of info that I dislike is the too-simple combat system, but I'll live with it since it is an improvement from Civ2). But will most of the data, not just AI, be readily available and accessible via text files? Will there be an opportunity for enterprising modders to try to improve upon the game?

Firaxis claims that Civ3 will reach new levels in modifiability for a Civ game. I'm just wondering if those new heights will reach those of Activision. I guess I'm still so amazed at the work that Wes' Dream Team has done that I'm wondering how many other games could be dramatically improved by allowing players to tweak as much as possible. Wes' CtP mods were labors of love, and it shows. Again, hopefully Civ3 won't need repair, but there's always room for change and improvement. I hope Firaxis gives us the chance to fiddle about.
ajbera is offline  
Old August 3, 2001, 12:40   #28
Solver
lifer
Civilization IV CreatorsAge of Nations TeamApolytoners Hall of FamePolyCast TeamBtS Tri-LeagueThe Courts of Candle'BreC4WDG Team Apolyton
Deity
 
Solver's Avatar
 
Local Time: 15:01
Local Date: October 31, 2010
Join Date: Sep 2000
Location: Latvia, Riga
Posts: 18,355
I guess Civ 3 will have open text files (like CtP), and also have editors included.
__________________
Solver, WePlayCiv Co-Administrator
Contact: solver-at-weplayciv-dot-com
I can kill you whenever I please... but not today. - The Cigarette Smoking Man
Solver is offline  
Old August 3, 2001, 12:45   #29
SSBLoveU
Warlord
 
SSBLoveU's Avatar
 
Local Time: 08:01
Local Date: October 31, 2010
Join Date: Aug 2001
Location: USA
Posts: 169
This shareware program written in BASIC can be used by students to learn AI, just included all the names on it if you improve it.
Eliza was popular in schools during the 1960s and 1970s. I did not get a copy of it until later while I was in graduate school. The original program was done by JOESEPH WEIZENBAUM. Ever since then people have been trying to make the computer talk like humans. I am hoping Civilization III will have really good AI.

10 REM
20 REM
30 REM
40 REM
50 REM
60 REM
70 REM
80 REM
90 REM
100 REM
110 REM
120 REM
130 REM
140 REM
150 REM
160 REM
170 REM
180 REM
190 REM
200 REM
210 PRINT " ______ "
220 PRINT " / /\ "
230 PRINT " / / \ "
240 PRINT " / / \ "
250 PRINT " / /\ \ "
260 PRINT " / / \ \ "
270 PRINT " INFOTRAN TELERESOURCE "
280 PRINT " / / \ \ "
290 PRINT " / / \ \ "
300 PRINT " / /_ _ _ _ _ \ \ "
310 PRINT " \ / \ / "
320 PRINT " \ / \ / "
330 PRINT " \/_ _ _ _ _ _ _ _ \/ "
340 PRINT " "
350 PRINT " A DIVISION OF INFOTRAN CORP."
360 PRINT " HOUSTON, TEXAS"
370 PRINT ""
380 PRINT " COPYRIGHT (C) INFOTRAN CORP. 1983"
390 FOR I = 1 TO 5 : PRINT : NEXT I
400 FOR I = 1 TO 2000
410 NEXT I
420 FOR I = 1 TO 24
430 PRINT
440 NEXT I
450 PRINT " *** NOW on THE SOURCE ***"
460 PRINT ""
470 PRINT " GREAT PROGRAMS YOU CAN DOWNLOAD "
480 PRINT " INTO YOUR COMPUTER ... IMMEDIATELY"
490 PRINT ""
500 PRINT " ****************************************"
510 PRINT " ADVENTURES --- GAMES --- BUSINESS"
520 PRINT " EDUCATION --- SCIENCE --- MATH"
530 PRINT ""
540 PRINT " SOFTWARE AVAILABLE FOR MOST COMPUTERS"
550 PRINT " ****************************************"
560 PRINT ""
570 PRINT " DON'T LEAVE HOME..."
580 PRINT " SAVE ON GREAT SOFTWARE..."
590 PRINT " USE TELERESOURCE ..."
600 PRINT ""
610 PRINT " TO ACCESS TELERESOURCE:"
620 PRINT " AT COMMAND LEVEL ON THE SOURCE,"
630 PRINT " -------------------------------"
640 PRINT " TYPE: CO SFILES>ST3899>SOFTWARE"
650 PRINT " -------------------------------"
660 PRINT ""
670 PRINT " CONTINUE - PRESS RETURN";
680 INPUT Q$
690 FOR I = 1 TO 24
700 PRINT
710 NEXT I
720 ' ELIZA/DOCTOR
730 ' CREATED BY JOESEPH WEIZENBAUM
740 ' THIS VERSION BY JEFF SHRAGER
750 ' EDITED AND MODIFIED FOR IBM-PC BASICA A BY WILBUR STREETT
760 ' 1806 PITNEY STREET, OCEAN, NJ, 07712, 531-3790
770 '
780 ' ----------INITIALAZATION-----------
790 DIM C$(72),I$(72),K$(72),F$(72),S$(72),R$(72),P$(72),Z $(72)
800 DIM S(36),R(36),N(36)
810 N1=36:N2=12:N3=112
820 FOR X=1 TO N1+N2+N3:READ Z$:NEXT X:REM SAME AS RESTORE
830 FOR X=1 TO N1
840 READ S(X),L:R(X)=S(X):N(X)=S(X)+L-1
850 NEXT X
860 PRINT "HI! I'M ELIZA. WHAT'S YOUR PROBLEM?"
870 REM
880 REM ------- USER INPUT SECTION----------
890 REM
900 LINE INPUT I$
910 I$=" "+I$+" " ' GET RID OF APOSTROPHES
920 FOR L=1 TO LEN(I$)
930 IF MID$(I$,L,1)="'" THEN I$=LEFT$(I$,L-1)+RIGHT$(I$,LEN(I$)-L):GOTO 930
940 IF L+4<=LEN(I$) THEN IF MID$(I$,L,4)="SHUT" THEN PRINT "SHUT UP....":END
950 NEXT L
960 IF I$=P$ THEN PRINT "PLEASE DON'T REPEAT YOURSELF!":GOTO 870
970 REM
980 REM --------FIND KEYWORD IN I$-----
990 REM
1000 RESTORE
1010 S=0
1020 FOR K=1 TO N1
1030 READ K$
1040 IF S>0 THEN 1080
1050 FOR L=1 TO LEN(I$)-LEN(K$)+1
1060 IF MID$(I$,L,LEN(K$))=K$ THEN S=K:T=L:F$=K$
1070 NEXT L
1080 NEXT K:IF S>0 THEN K=S:L=T:GOTO 1110
1090 K=36:GOTO 1310:REM WE DIDN'T FIND ANY KEYWORDS
1100 REM
1110 REM TAKE RIGHT PART OF STRING AND CONJUGATE IT
1120 REM USING THE LIST OF STRINGS TO BE SWAPPED
1130 REM
1140 RESTORE:FOR X=1 TO N1:READ Z$:NEXT X:REM SKIP OVER KEYWORDS
1150 C$=" "+RIGHT$(I$,LEN(I$)-LEN(F$)-L+1)
1160 FOR X=1 TO N2/2
1170 READ S$,R$
1180 FOR L=1 TO LEN(C$)
1190 IF L+LEN(S$)=LEN(C$) THEN 1240
1200 IF MID$(C$,L,LEN(S$))<>S$ THEN 1240
1210 C$=LEFT$(C$,L-1)+R$+RIGHT$(C$,LEN(C$)-L-LEN(S$)+1)
1220 L=L+LEN(R$)
1230 GOTO 1270
1240 IF L+LEN(R$)>LEN(C$) THEN 1270
1250 IF MID$(C$,L,LEN(R$))<>R$ THEN 1270
1260 C$=LEFT$(C$,L-1)+S$+RIGHT$(C$,LEN(C$)-L-LEN(R$)+1)
1270 NEXT L
1280 NEXT X
1290 IF MID$(C$,2,1)=" " THEN C$=RIGHT$(C$,LEN(C$)-1):REM ONLY 1 SPACE
1300 REM
1310 REM NOW USING THE KEYWORD NUMBER (K) GET REPLY
1320 REM
1330 RESTORE:FOR X=1 TO N1+N2:READ Z$:NEXT X
1340 FOR X=1 TO R(K):READ F$:NEXT X:REM READ RIGHT REPLY
1350 R(K)=R(K)+1:IF R(K)>N(K) THEN R(K)=S(K)
1360 IF RIGHT$(F$,1)<>"*" THEN PRINT F$:P$=I$:GOTO 870
1370 PRINT LEFT$(F$,LEN(F$)-1);C$
1380 P$=I$:GOTO 870
1390 REM
1400 REM ---------PROGRAM DATA FOLLOWS----------
1410 REM
1420 REM KEYWORDS
1430 REM
1440 DATA "CAN YOU","CAN I","YOU ARE","YOURE","I DONT","I FEEL"
1450 DATA "WHY DONT YOU","WHY CANT I","ARE YOU","I CANT","I AM","IM "
1460 DATA "YOU ","I WANT","WHAT","HOW","WHO","WHERE","WHEN","WHY"
1470 DATA "NAME","CAUSE","SORRY","DREAM","HELLO","HI ","MAYBE"
1480 DATA "NO ","YOUR","ALWAYS","THINK","ALIKE","YES","FRIEND"
1490 DATA "COMPUTER","NOKEYFOUND"
1500 REM
1510 REM STRING DATA FOR CONJUGATIONS
1520 REM
1530 DATA " ARE "," AM ","WERE ","WAS "," YOU "," I "," YOUR ","MY "
1540 DATA " IVE "," YOURVE "," IM "," YOURE "
1550 REM
1560 REM REPLIES
1570 REM
1580 DATA "DON'T YOU BELIEVE THAT I CAN*"
1590 DATA "PERHAPS YOU WOULD LIKE TO BE ABLE TO*"
1600 DATA "YOU WANT ME TO BE ABLE TO*"
1610 DATA "PERHAPS YOU DON'T WANT TO*"
1620 DATA "DO YOU WANT TO BE ABLE TO*"
1630 DATA "WHAT MAKES YOU THINK I AM*"
1640 DATA "DOES IT PLEASE YOU TO BELIEVE I AM*"
1650 DATA "PERHAPS YOU WOULD LIKE TO BE*"
1660 DATA "DO YOU SOMETIMES WISH YOU WERE*"
1670 DATA "DON'T YOU REALLY*"
1680 DATA "WHY DON'T YOU*"
1690 DATA "DO YOU WISH TO BE ABLE TO*"
1700 DATA "DOES THAT TROUBLE YOU?"
1710 DATA "TELL ME MORE ABOUT SUCH FELLINGS."
1720 DATA "DO YOU OFTEN FEEL*"
1730 DATA "DO YOU ENJOY FEELING*"
1740 DATA "DO YOU REALLY BELIEVE I DON'T*"
1750 DATA "PERHAPS IN GOOD TIME I WILL*"
1760 DATA "DO YOU WANT ME TO*"
1770 DATA "DO YOU THINK YOU SHOULD BE ABLE TO*'
1780 DATA "WHY CAN'T YOU*"
1790 DATA "WHY ARE YOU INTERESTED IN WHETER OR NOT I AM*"
1800 DATA "WOULD YOU PREFER IF I WERE NOT*"
1810 DATA "PERHAPS IN YOUR FANTASIES I AM*"
1820 DATA "HOW DO YOU KNOW YOU CAN'T*"
1830 DATA "HAVE YOU TRIED?"
1840 DATA "PERHAPS YOU CAN NOW*"
1850 DATA "DID YOU COME TO ME BECAUSE YOU ARE*"
1860 DATA "HOW LONG HAVE YOU BEEN*"
1870 DATA "DO YOU BELIEVE IT IS NORMAL TO BE*"
1880 DATA "DO YOU ENJOY BEING*"
1890 DATA "WE WERE DISCUSSING YOU-- NOT ME."
1900 DATA "OH, I*"
1910 DATA "YOU'RE NOT REALLY TALKING ABOUT ME, ARE YOU?"
1920 DATA "WHAT WOULD IT MEAN TO YOU IF I GOT*"
1930 DATA "WHY DO YOU WANT*"
1940 DATA "SUPPOSE YOU SOON GOT*"
1950 DATA "WHAT IF YOU NEVER GOT*"
1960 DATA "I SOMETIMES ALSO WANT*"
1970 DATA "WHY DO YOU ASK?"
1980 DATA "DOES THAT QUESTION INTEREST YOU?"
1990 DATA "WHAT ANSWER WOULD PLEASE YOU THE MOST?"
2000 DATA "WHAT DO YOU THINK?"
2010 DATA "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?"
2020 DATA "WHAT IS IT THAT YOU REALLY WHAT TO KNOW?"
2030 DATA "HAVE YOU ASKED ANYONE ELSE?"
2040 DATA "HAVE YOU ASKED SUCH QUESTIONS BEFORE?"
2050 DATA "WHAT ELSE COMES TO MIND WHEN YOU ASK THAT?"
2060 DATA "NAMES DON'T INTEREST ME."
2070 DATA "I DON'T CARE ABOUT NAMES-- PLEASE GO ON."
2080 DATA "IS THAT THE REAL REASON?"
2090 DATA "DON'T ANY OTHER REASONS COME TO MIND?"
2100 DATA "DOES THAT REASON EXPLAIN ANYTHING ELSE?"
2110 DATA "WHAT OTHER REASONS MIGHT THERE BE?"
2120 DATA "PLEASE DON'T APOLOGIZE!"
2130 DATA "APOLOGIES ARE NOT NECESSARY."
2140 DATA "WHAT FEELING DO YOU HAVE WHEN YOU APOLOGIZE?"
2150 DATA "DON'T BE SO DEFENSIVE!"
2160 DATA "WHAT DOES THAT DREAM SUGGEST TO YOU?"
2170 DATA "DO YOU DREAM OFTEN?"
2180 DATA "WHAT PERSONS APPEAR IN YOUR DREAMS?"
2190 DATA "ARE YOU DISTURBED BY YOUR DREAMS?"
2200 DATA "HOW DO YOU DO .... PLEASE STATE YOUR PROBLEM."
2210 DATA "YOU DON'T SEEM QUITE CERTAIN."
2220 DATA "WHY THE UNCERTAIN TONE?"
2230 DATA "CAN'T YOU BE MORE POSITIVE?"
2240 DATA "YOU AREN'T SURE?"
2250 DATA "DON'T YOU KNOW?"
2260 DATA "ARE YOU SAYING NO JUST TO BE NEGATIVE?"
2270 DATA "YOU ARE BEING A BIT NEGATIVE."
2280 DATA "WHY NOT?"
2290 DATA "ARE YOU SURE?"
2300 DATA "WHY NO?"
2310 DATA "WHY ARE YOU CONCERNED ABOUT MY*"
2320 DATA "WHAT ABOUT YOUR OWN*"
2330 DATA "CAN YOU THINK OF A SPECIFIC EXAMPLE?"
2340 DATA "WHEN?"
2350 DATA "WHAT ARE YOU THINKING OF?"
2360 DATA "REALLY, ALWAYS?"
2370 DATA "DO YOU REALLY THINK SO?"
2380 DATA "BUT YOU ARE NOT SURE YOU*"
2390 DATA "DO YOU DOUBT YOU*"
2400 DATA "IN WHAT WAY?"
2410 DATA "WHAT RESEMBLANCE DO YOU SEE?"
2420 DATA "WHAT DOES THE SIMILARITY SUGGEST TO YOU?"
2430 DATA "WHAT OTHER CONNECTIONS DO YOU SEE?"
2440 DATA "COULD THER REALLY BE SOME CONNECTION?"
2450 DATA "HOW?"
2460 DATA "YOU SEEM QUITE POSITIVE."
2470 DATA "ARE YOU SURE?"
2480 DATA "I SEE."
2490 DATA "I UNDERSTAND."
2500 DATA "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?"
2510 DATA "DO YOUR FRIENDS WORRY YOU?"
2520 DATA "DO YOUR FRIENDS PICK ON YOU?"
2530 DATA "ARE YOU SURE YOU HAVE ANY FRIENDS?"
2540 DATA "DO YOU IMPOSE ON YOUR FRIENDS?"
2550 DATA "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU."
2560 DATA "DO COMPUTERS WORRY YOU?"
2570 DATA "ARE YOU TALKING ABOUT ME IN PARTICULAR?"
2580 DATA "ARE YOU FRIGHTENED BY MACHINES?"
2590 DATA "WHY DO YOU MENTION COMPUTERS?"
2600 DATA "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?"
2610 DATA "DON'T YOU THINK COMPUTERS CAN HELP PEOPLE?"
2620 DATA "WHAT IS IT ABOUT COMPUTER THAT WORRIES YOU?"
2630 DATA "SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS?"
2640 DATA "WHAT DOES THAT SUGGEST TO YOU?"
2650 DATA "I SEE."
2660 DATA "I'M NOT SURE I UNDERSTAND YOU FULLY."
2670 DATA "COME, COME, ELUCIDATE YOUR THOUGHTS."
2680 DATA "CAN YOU ELABORATE ON THAT?"
2690 DATA "THAT IS QUITE INTERESTING."
2700 REM
2710 REM DATA FOR FINDING RIGHT REPLIES
2720 REM
2730 DATA 1,3,4,2,6,4,6,4,10,4,14,3,17,3,20,2,22,3,25,3
2740 DATA 28,4,28,4,32,3,35,5,40,9,40,9,40,9,40,9,40,9,40,9
2750 DATA 49,2,51,4,55,4,59,4,63,1,63,1,64,5,69,5,74,2,76,4
2760 DATA 80,3,83,7,90,3,93,6,99,7,106,6
2770 END
32000 END
SSBLoveU is offline  
Old August 3, 2001, 20:41   #30
Lou Wigman
Warlord
 
Lou Wigman's Avatar
 
Local Time: 22:01
Local Date: October 31, 2010
Join Date: Jun 2001
Location: Newcastle,Australia
Posts: 137
If you think that you can tweek an AI like that in CTP2 you are having yourselves on. There are so many parameters that such a task would take a few thousand years. After adjusting a couple of things you would need to play test to see if this actually did what you wanted. Tweek again, play again etc. Since there are hundreds of parameters this is clearly an impossible task.

A real AI that learns and adapts its play to its opponents is not even on the horizon. Sorry for being a wet blanket!
Lou Wigman is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 08:01.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team