Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Archive > CtP2-Creation/AI/Mods/Scenarios-Archive > SLIC syntax
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:23
  Old Post 15-10-2002 20:19 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
SLIC syntax Increase Your PM Length

Just wanted to check something - am I correct in thinking that square brackets [] are used in SLIC only for accessing array members?

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:23
Post  Old Post 15-10-2002 20:34 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton buy from Amazon

So far as I know in Slic2 you use quare brackets to access members of arrays and indicate that the just definded variable is an array. From the Slic1 documentation I have this:

quote:

Regions

There are a number of functions above which act on regions. A region is a parallelogram or union of parallelograms on the map. They can be defined in two ways.

A simple region:

Region name [ x1,y2, x2, y2];


Or a complex region built from a union of any number of simple regions:

Region name = name1 + name2 [+ ... + namen]


WARNING: Regions have not been thoroughly tested, they may not work as advertised!


It looks that the quare brackets in the first of the two examples are part of the syntax, don't know if this can be used in CTP2. I don't know either if you can use in CTP1 arrays.

-Martin

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:23
  Old Post 15-10-2002 20:42 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Inflate your Upload Space

I know you can't use arrays in CTP1, and I know of noone who even tried to use regions in either game, but I suspect that they are not in CTP2. Regardless, that's all fine for the purpose I was concerned about.

Thanks.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:23
  Old Post 15-10-2002 21:03 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

Weren't the regions part of the fuzzy-logic AI coding? As that isn't used in CtP2, it'd be a fair bet that regions are not used either.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:23
Post  Old Post 15-10-2002 21:12 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Increase Your PM Length

The CTP1 region functions are also present in CTP2 but I guess it is very unlikely that they do something, of course this has to be tested, but than I have to find out how to create a region. Of course these regions could be usefull for some stuff.

-Martin

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:23
  Old Post 15-10-2002 22:38
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

I have a very faint recollection that Locutus either used or tried to use regions for something or other. AFAIK, he was the only one who looked at them.

SMIFFGIG is offline SMIFFGIG
Prince
Great Britain
Jul 2002
time: 05:23
  Old Post 15-10-2002 23:03 Visit SMIFFGIG's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Help yourself to an AD-FREE life

what is AI-fuzzy logic ?

dont answer if its like a massive explanation need not waste your time

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:23
  Old Post 15-10-2002 23:12 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton buy from Amazon

Fuzzy logic is a means by which AI (Artificial Intelligence) can make decisions. It was used in CTP1, but not 2. It essentially entails a mathematical interpretation of statements like:

IF I'm at war AND I have few troops THEN I should build more troops.

The good thing about fuzzy logic is that it allows for statements to be partly true - they all have a truth value between 0 and 1 inclusive. This is very useful for interpreting "real world" statements, combining them and so forth. The only places where the fuzziness was really used in CTP1 was in the diplomacy (the rest used only the most crisp form of fuzzy logic it could), but it could have been applied to almost all of the decisions made.

WesW and some others spent hundreds of man-hours tweaking the CTP AI for the MedMod, but noone knows exactly what's going on since we don't know what implication rules and defuzzification methods were used (though we can make a fair guess).

SMIFFGIG is offline SMIFFGIG
Prince
Great Britain
Jul 2002
time: 05:23
  Old Post 15-10-2002 23:16 Visit SMIFFGIG's homepage!
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton buy from Amazon

I understand what your saying and can see definite advantages with using it (or the possibilities of using it) But then why did ctp not make much use of it and why was it tottaly excluded from ctp2. Is there so problems with it that we dont know about or something, surely they should have developed upon the system for ctp2????

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:23
  Old Post 15-10-2002 23:23 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Tired of ads?

I would guess because they hadn't actually made much use of the fuzziness before, they decided it was an unnecessary complication, but you'd have to ask those Apolyton members more intimately involved in the development.

In a way it's a shame they stopped using it because it's very powerful if used correctly, but on the other hand it's easy to get very confused as to what's going on, and it fairly complex to use.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:23
  Old Post 16-10-2002 01:40 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Remove this text

Yes, I vaguely recall trying to use regions but failing. IIRC (but my memories on this are very vague and I lost any notes I made at the time) they're not even implemented in CtP2 (they barely were in CtP1 either).

IIRC fuzzy logic was thrown out to make things easier for the modmakers. It's great that they thought of us, but personally I think I would have preferred it if they had kept it in...

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:23
  Old Post 16-10-2002 02:09 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton, buy Call to Power 2

In case anyone was wondering why I cared, it's for the next generation of my SLIC template system. My target was to have a system able to auto-generate the unit-updater code arrays, and I have now achieved this goal (more or less). Just to demonstrate, this template:

code:
[*units.ces [?ObsoleteAdvance| OLD_UNIT_TYPE[[##]]=UnitDB([.Name]); [~ObsoleteAdvance enadv[[##]]=Advance_DB([.Name]); NEW_UNIT_TYPE[[##]]=UnitDB([~Consequences [?[.DB]=DATABASE_UNITS|[.Name]); PER_UNIT_UPDATE_COST[[##]]=[.ShieldCost];|][![?[.DB]=DATABASE_UNITS|!|]]][!!]] |][#[?ObsoleteAdvance|+|]]]


Generates the required SLIC, starting with the following sample output (based on the default rules):

code:
OLD_UNIT_TYPE[0]=UnitDB(UNIT_ARCHER); enadv[0]=Advance_DB(ADVANCE_CANNON_MAKING); NEW_UNIT_TYPE[0]=UnitDB(UNIT_CANNON); PER_UNIT_UPDATE_COST[0]=1200; OLD_UNIT_TYPE[1]=UnitDB(UNIT_BOMBER); enadv[1]=Advance_DB(ADVANCE_ADVANCED_COMPOSITES); NEW_UNIT_TYPE[1]=UnitDB(UNIT_STEALTH_BOMBER); PER_UNIT_UPDATE_COST[1]=3375; OLD_UNIT_TYPE[2]=UnitDB(UNIT_CANNON); enadv[2]=Advance_DB(ADVANCE_CYBERNETICS); NEW_UNIT_TYPE[2]=UnitDB(UNIT_WAR_WALKER); PER_UNIT_UPDATE_COST[2]=3500; OLD_UNIT_TYPE[3]=UnitDB(UNIT_CARAVAN); enadv[3]=Advance_DB(ADVANCE_GLOBAL_ECONOMICS); NEW_UNIT_TYPE[3]=UnitDB(UNIT_Z_FREIGHT_TRANSPORT); PER_UNIT_UPDATE_COST[3]=1200; OLD_UNIT_TYPE[4]=UnitDB(UNIT_CARRACK); enadv[4]=Advance_DB(ADVANCE_INTERNAL_COMBUSTION); NEW_UNIT_TYPE[4]=UnitDB(UNIT_TROOP_SHIP); PER_UNIT_UPDATE_COST[4]=1200; OLD_UNIT_TYPE[5]=UnitDB(UNIT_CATAMARAN); enadv[5]=Advance_DB(ADVANCE_HULL_MAKING); NEW_UNIT_TYPE[5]=UnitDB(UNIT_LONGSHIP); PER_UNIT_UPDATE_COST[5]=630; OLD_UNIT_TYPE[6]=UnitDB(UNIT_CATAPULT); enadv[6]=Advance_DB(ADVANCE_EXPLOSIVES); NEW_UNIT_TYPE[6]=UnitDB(UNIT_ARTILLERY); PER_UNIT_UPDATE_COST[6]=1500; OLD_UNIT_TYPE[7]=UnitDB(UNIT_CAVALRY); enadv[7]=Advance_DB(ADVANCE_FUSION); NEW_UNIT_TYPE[7]=UnitDB(UNIT_FUSION_TANK); PER_UNIT_UPDATE_COST[7]=5250; OLD_UNIT_TYPE[8]=UnitDB(UNIT_CLERIC); enadv[8]=Advance_DB(ADVANCE_MASS_MEDIA); NEW_UNIT_TYPE[8]=UnitDB(UNIT_TELEVANGELIST); PER_UNIT_UPDATE_COST[8]=1200; OLD_UNIT_TYPE[9]=UnitDB(UNIT_DESTROYER); enadv[9]=Advance_DB(ADVANCE_PLASMA_WEAPONRY); NEW_UNIT_TYPE[9]=UnitDB(UNIT_PLASMA_DESTROYER); PER_UNIT_UPDATE_COST[9]=4500; OLD_UNIT_TYPE[10]=UnitDB(UNIT_DIPLOMAT); enadv[10]=Advance_DB(ADVANCE_EUGENICS); NEW_UNIT_TYPE[10]=UnitDB(UNIT_EMPATHIC_DIPLOMAT); PER_UNIT_UPDATE_COST[10]=1500; OLD_UNIT_TYPE[11]=UnitDB(UNIT_FIGHTER); enadv[11]=Advance_DB(ADVANCE_SUPERSONIC_FLIGHT); NEW_UNIT_TYPE[11]=UnitDB(UNIT_INTERCEPTOR); PER_UNIT_UPDATE_COST[11]=2500; OLD_UNIT_TYPE[12]=UnitDB(UNIT_FIRE_TRIREME); enadv[12]=Advance_DB(ADVANCE_MODERN_METALLURGY); NEW_UNIT_TYPE[12]=UnitDB(UNIT_IRONCLAD); PER_UNIT_UPDATE_COST[12]=1500; OLD_UNIT_TYPE[13]=UnitDB(UNIT_FRIGATE); enadv[13]=Advance_DB(ADVANCE_PLASMA_WEAPONRY); NEW_UNIT_TYPE[13]=UnitDB(UNIT_PLASMA_DESTROYER); PER_UNIT_UPDATE_COST[13]=4500; OLD_UNIT_TYPE[14]=UnitDB(UNIT_HOPLITE); enadv[14]=Advance_DB(ADVANCE_GUNPOWDER); NEW_UNIT_TYPE[14]=UnitDB(UNIT_INFANTRYMAN); PER_UNIT_UPDATE_COST[14]=1000; OLD_UNIT_TYPE[15]=UnitDB(UNIT_INFANTRYMAN); enadv[15]=Advance_DB(ADVANCE_ADV_INFANTRY_TACTICS) ; NEW_UNIT_TYPE[15]=UnitDB(UNIT_MARINE); PER_UNIT_UPDATE_COST[15]=1400; OLD_UNIT_TYPE[16]=UnitDB(UNIT_INTERCEPTOR); enadv[16]=Advance_DB(ADVANCE_AI_SURVEILLANCE); NEW_UNIT_TYPE[16]=UnitDB(UNIT_SPY_PLANE); PER_UNIT_UPDATE_COST[16]=2815;


Which is mostly pretty good (though the last one is obviously a bit wrong, and there are a couple of others in a similar vein).

Now, from that, can anyone work out the template syntax? .

Edit: Some strange new-lines and spaces have appeared in that which shouldn't be there...

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:23
  Old Post 16-10-2002 02:17 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton buy from Amazon

Should there be an _ in Advance_DB ?

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:23
  Old Post 16-10-2002 02:22 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Tired of ads?

Nope. But that's trivial to fix. I was confusing it with DATABASE_ADVANCES .

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:23.
Apolyton Time is 00:23.
    top of page
Rate This Thread:
archivepost
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0512 seconds (90.61% PHP - 9.39% MySQL) with 31 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net