Announcement

Collapse
No announcement yet.

User programmable AI

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    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.Poincaré

    Comment


    • #17
      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

      Comment


      • #18
        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.

        Comment


        • #19
          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

          Comment


          • #20
            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.

            Comment


            • #21
              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

              Comment


              • #22
                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.
                <p style="font-size:1024px">HTML is disabled in signatures </p>

                Comment


                • #23
                  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

                  Comment


                  • #24
                    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."

                    Comment


                    • #25
                      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

                      Comment


                      • #26
                        great. so you pay 50 usd so that you can work a bit more on things they could not be arsed to do....

                        Comment


                        • #27
                          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.

                          Comment


                          • #28
                            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

                            Comment


                            • #29
                              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

                              Comment


                              • #30
                                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!

                                Comment

                                Working...
                                X