翔鹰帝国网|帝国时代论坛|帝国时代系列|神话时代
 找回密码
 注册翔鹰会员(昵称)
搜索
查看: 2521|回复: 6

[发展AI] 发布一个战役AI,适用和电脑对抗(不适合制作战役)

[复制链接]

5

主题

0

精华

261

积分

男爵

耕战
40
鹰币
711
天龙币
0
回帖
44

翔鹰建站十周年纪念章

附庸关系0
发表于 2014-1-12 18:41:35 | 显示全部楼层 |阅读模式
本帖最后由 系统错误 于 2014-1-12 18:43 编辑

废话不多说,直接给文件


以下是脚本语言。

研究科技-黑暗年代-城镇中心-织布机
(defrule
    (can-research-with-escrow ri-loom)
=>
    (research ri-loom)
)

;研究科技-封建年代-城镇中心-手推车
(defrule
    (can-research-with-escrow ri-hand-cart)
=>
    (research ri-hand-cart)
)

;研究科技-封建年代-城镇中心-城镇巡逻
(defrule
    (can-research-with-escrow ri-town-patrol)
=>
    (research ri-town-patrol)
)

;研究科技-城堡年代-城镇中心-独轮车
(defrule
    (can-research-with-escrow ri-wheel-barrow)
=>
    (research ri-wheel-barrow)
)

;研究科技-城堡年代-城镇中心-城镇辽望
(defrule
    (can-research-with-escrow ri-town-watch)
=>
    (research ri-town-watch)
)

;研究科技-封建年代-磨坊-马轭
(defrule
    (can-research-with-escrow ri-horse-collar)
=>
    (research ri-horse-collar)
)

;研究科技-城堡年代-磨坊-重犁
(defrule
    (can-research-with-escrow ri-heavy-plow)
=>
    (research ri-heavy-plow)
)

;研究科技-帝王年代-磨坊-轮作
(defrule
    (can-research-with-escrow ri-crop-rotation)
=>
    (research ri-crop-rotation)
)

;研究科技-封建年代-采矿场-采金业
(defrule
    (can-research-with-escrow ri-gold-mining)
=>
    (research ri-gold-mining)
)

;研究科技-封建年代-采矿场-采石业
(defrule
    (can-research-with-escrow ri-stone-mining)
=>
    (research ri-stone-mining)
)

;研究科技-城堡年代-采矿场-钻井采金
(defrule
    (can-research-with-escrow ri-gold-shaft-mining)
=>
    (research ri-gold-shaft-mining)
)

;研究科技-城堡年代-采矿场-钻井采石
(defrule
    (can-research-with-escrow ri-stone-shaft-mining)
=>
    (research ri-stone-shaft-mining)
)

;研究科技-封建年代-伐木场-双头锯
(defrule
    (can-research-with-escrow ri-double-bit-axe)
=>
    (research ri-double-bit-axe)
)

;研究科技-城堡年代-伐木场-弓锯
(defrule
    (can-research-with-escrow ri-bow-saw)
=>
    (research ri-bow-saw)
)

;研究科技-帝王年代-伐木场-双人锯
(defrule
    (can-research-with-escrow ri-two-man-saw)
=>
    (research ri-two-man-saw)
)

;研究科技-城堡年代-船坞-修船厂
(defrule
    (can-research-with-escrow ri-careening)
=>
    (research ri-careening)
)

;研究科技-城堡年代-船坞-研究战舰
(defrule
    (can-research-with-escrow ri-war-galley)
=>
    (research ri-war-galley)
)

;研究科技-帝王年代-船坞-研究火炮船
(defrule
    (can-research-with-escrow ri-cannon-galleon)
=>
    (research ri-cannon-galleon)
)

;研究科技-帝王年代-船坞-升级干船坞
(defrule
    (can-research-with-escrow ri-dry-dock)
=>
    (research ri-dry-dock)
)

;研究科技-帝王年代-船坞-研究维京人的精锐龙头战舰
(defrule
    (can-research-with-escrow ri-elite-longboat)
=>
    (research ri-elite-longboat)
)

;研究科技-帝王年代-船坞-研究快速喷火船
(defrule
    (can-research-with-escrow ri-fast-fire-ship)
=>
    (research ri-fast-fire-ship)
)

;研究科技-帝王年代-船坞-研究大型战舰
(defrule
    (can-research-with-escrow ri-galleon)
=>
    (research ri-galleon)
)

;研究科技-帝王年代-船坞-研究重型爆破船
(defrule
    (can-research-with-escrow ri-heavy-demolition-ship)
=>
    (research ri-heavy-demolition-ship)
)

;研究科技-帝王年代-船坞-研究造船匠
(defrule
    (can-research-with-escrow ri-shipwright)
=>
    (research ri-shipwright)
)

;研究科技-封建年代-铁匠铺-研究箭羽
(defrule
    (can-research-with-escrow ri-fletching)
=>
    (research ri-fletching)
)

;研究科技-封建年代-铁匠铺-研究锻造
(defrule
    (can-research-with-escrow ri-forging)
=>
    (research ri-forging)
)

;研究科技-封建年代-铁匠铺-研究射手软甲
(defrule
    (can-research-with-escrow ri-padded-archer-armor)
=>
    (research ri-padded-archer-armor)
)

;研究科技-封建年代-铁匠铺-研究骑兵鳞甲
(defrule
    (can-research-with-escrow ri-scale-barding)
=>
    (research ri-scale-barding)
)

;研究科技-封建年代-铁匠铺-研究步兵鳞甲
(defrule
    (can-research-with-escrow ri-scale-mail)
=>
    (research ri-scale-mail)
)

;研究科技-城堡年代-铁匠铺-研究锥子箭
(defrule
    (can-research-with-escrow ri-bodkin-arrow)
=>
    (research ri-bodkin-arrow)
)

;研究科技-城堡年代-铁匠铺-研究骑兵锁甲
(defrule
    (can-research-with-escrow ri-chain-barding)
=>
    (research ri-chain-barding)
)

;研究科技-城堡年代-铁匠铺-研究步兵锁甲
(defrule
    (can-research-with-escrow ri-chain-mail)
=>
    (research ri-chain-mail)
)

;研究科技-城堡年代-铁匠铺-研究铸铁术
(defrule
    (can-research-with-escrow ri-iron-casting)
=>
    (research ri-iron-casting)
)

;研究科技-城堡年代-铁匠铺-研究射手皮甲
(defrule
    (can-research-with-escrow ri-leather-archer-armor)
=>
    (research ri-leather-archer-armor)
)

;研究科技-帝王年代-铁匠铺-研究鼓风炉
(defrule
    (can-research-with-escrow ri-blast-furnace)
=>
    (research ri-blast-furnace)
)

;研究科技-帝王年代-铁匠铺-研究护腕
(defrule
    (can-research-with-escrow ri-bracer)
=>
    (research ri-bracer)
)

;研究科技-帝王年代-铁匠铺-研究骑兵钢甲
(defrule
    (can-research-with-escrow ri-plate-barding)
=>
    (research ri-plate-barding)
)

;研究科技-帝王年代-铁匠铺-研究步兵钢甲
(defrule
    (can-research-with-escrow ri-plate-mail)
=>
    (research ri-plate-mail)
)

;研究科技-帝王年代-铁匠铺-研究射手锁甲
(defrule
    (can-research-with-escrow ri-ring-archer-armor)
=>
    (research ri-ring-archer-armor)
)

;研究科技-封建年代-市场-研究绘图术
(defrule
    (can-research-with-escrow ri-cartography)
=>
    (research ri-cartography)
)

;研究科技-封建年代-市场-研究铸币术
(defrule
    (can-research-with-escrow ri-coinage)
=>
    (research ri-coinage)
)

;研究科技-城堡年代-市场-研究银行业
(defrule
    (can-research-with-escrow ri-banking)
=>
    (research ri-banking)
)

;研究科技-城堡年代-市场-研究大蓬车
(defrule
    (can-research-with-escrow ri-caravan)
=>
    (research ri-caravan)
)

;研究科技-帝王年代-市场-研究行会
(defrule
    (can-research-with-escrow ri-guilds)
=>
    (research ri-guilds)
)

;研究科技-城堡年代-修道院-僧侣可转化敌人僧侣(或传教士)
(defrule
    (can-research-with-escrow ri-atonement)
=>
    (research ri-atonement)
)

;研究科技-城堡年代-修道院-僧侣移动快15%
(defrule
    (can-research-with-escrow ri-fervor)
=>
    (research ri-fervor)
)

;研究科技-城堡年代-修道院-被转化的单位立即死亡
(defrule
    (can-research-with-escrow ri-heresy)
=>
    (research ri-heresy)
)

;研究科技-城堡年代-修道院-僧侣可转化建筑物与攻城武器
(defrule
    (can-research-with-escrow ri-redemption)
=>
    (research ri-redemption)
)

;研究科技-城堡年代-修道院-僧侣的生命值加50%
(defrule
    (can-research-with-escrow ri-sanctity)
=>
    (research ri-sanctity)
)

;研究科技-帝王年代-修道院-僧侣的转化距离+3
(defrule
    (can-research-with-escrow ri-block-printing)
=>
    (research ri-block-printing)
)

;研究科技-帝王年代-修道院-单位被敌人转化难50%
(defrule
    (can-research-with-escrow ri-faith)
=>
    (research ri-faith)
)

;研究科技-帝王年代-修道院-僧侣的信念恢复快50%
(defrule
    (can-research-with-escrow ri-illumination)
=>
    (research ri-illumination)
)

;研究科技-帝王年代-修道院-如果一群僧侣召唤敌人单位时,只有一个僧侣的信念值降低
(defrule
    (can-research-with-escrow ri-theocracy)
=>
    (research ri-theocracy)
)

;研究科技-城堡年代-大学-弹道学
(defrule
    (can-research-with-escrow ri-ballistics)
=>
    (research ri-ballistics)
)

;研究科技-城堡年代-大学-增强城墙
(defrule
    (can-research-with-escrow ri-fortified-wall)
=>
    (research ri-fortified-wall)
)

;研究科技-城堡年代-大学-警戒塔
(defrule
    (can-research-with-escrow ri-guard-tower)
=>
    (research ri-guard-tower)
)

;研究科技-城堡年代-大学-预热射击
(defrule
    (can-research-with-escrow ri-heated-shot)
=>
    (research ri-heated-shot)
)

;研究科技-城堡年代-大学-石匠
(defrule
    (can-research-with-escrow ri-masonry)
=>
    (research ri-masonry)
)

;研究科技-城堡年代-大学-射击孔
(defrule
    (can-research-with-escrow ri-murder-holes)
=>
    (research ri-murder-holes)
)

;研究科技-城堡年代-大学-脚踏起重机,村民建造速度加快20%
(defrule
    (can-research-with-escrow ri-stonecutting)
=>
    (research ri-stonecutting)
)

;研究科技-帝王年代-大学-建筑学
(defrule
    (can-research-with-escrow ri-architecture)
=>
    (research ri-architecture)
)

;研究科技-帝王年代-大学-火炮塔
(defrule
    (can-research-with-escrow ri-bombard-tower)
=>
    (research ri-bombard-tower)
)

;研究科技-帝王年代-大学-化学
(defrule
    (can-research-with-escrow ri-chemistry)
=>
    (research ri-chemistry)
)

;研究科技-帝王年代-大学-要塞
(defrule
    (can-research-with-escrow ri-keep)
=>
    (research ri-keep)
)

;研究科技-帝王年代-大学-攻城技师
(defrule
    (can-research-with-escrow ri-siege-engineers)
=>
    (research ri-siege-engineers)
)

;研究科技-黑暗年代-兵营-所有步兵视野+4
(defrule
    (can-research-with-escrow ri-tracking)
=>
    (research ri-tracking)
)

;研究科技-封建年代-兵营-将民兵升级成剑士
(defrule
    (can-research-with-escrow ri-man-at-arms)
=>
    (research ri-man-at-arms)
)

;研究科技-城堡年代-兵营-将剑士升级成长剑士
(defrule
    (can-research-with-escrow ri-long-swordsman)
=>
    (research ri-long-swordsman)
)

;研究科技-城堡年代-兵营-将长矛兵升级与长枪兵
(defrule
    (can-research-with-escrow ri-pikeman)
=>
    (research ri-pikeman)
)

;研究科技-城堡年代-兵营-步兵移动快10%
(defrule
    (can-research-with-escrow ri-squires)
=>
    (research ri-squires)
)

;研究科技-帝王年代-兵营-将长剑士升级成双手剑士
(defrule
    (can-research-with-escrow ri-two-handed-swordsman)
=>
    (research ri-two-handed-swordsman)
)

;研究科技-帝王年代-兵营-将双手剑士升级成冠军剑士
(defrule
    (can-research-with-escrow ri-champion)
=>
    (research ri-champion)
)

;研究科技-帝王年代-兵营-将雄鹰战士升级成精锐精锐雄鹰战士
(defrule
    (can-research-with-escrow ri-elite-eagle-warrior)
=>
    (research ri-elite-eagle-warrior)
)

;研究科技-帝王年代-兵营-将长枪兵升级成长戟兵
(defrule
    (can-research-with-escrow ri-halberdier)
=>
    (research ri-halberdier)
)

;研究科技-城堡年代-射箭场-将弓箭手升级成弩手
(defrule
    (can-research-with-escrow ri-crossbow)
=>
    (research ri-crossbow)
)

;研究科技-城堡年代-射箭场-将掷矛战士升级成精锐掷矛战士
(defrule
    (can-research-with-escrow ri-elite-skirmisher)
=>
    (research ri-elite-skirmisher)
)

;研究科技-城堡年代-射箭场-研究骑射手
(defrule
    (can-research-with-escrow ri-hand-cannon)
=>
    (research ri-hand-cannon)
)

;研究科技-城堡年代-射箭场-射箭速度加快,准确率100%
(defrule
    (can-research-with-escrow ri-thumb-ring)
=>
    (research ri-thumb-ring)
)

;研究科技-帝王年代-射箭场-将弩手升级成劲弩手
(defrule
    (can-research-with-escrow ri-arbalest)
=>
    (research ri-arbalest)
)

;研究科技-帝王年代-射箭场-将骑射手升级成重型骑射手
(defrule
    (can-research-with-escrow ri-heavy-cavalry-archer)
=>
    (research ri-heavy-cavalry-archer)
)

;研究科技-帝王年代-射箭场-骑射手 +1甲/+2盾,对长枪兵攻击+4,蒙古骑射手+2
(defrule
    (can-research-with-escrow ri-parthian-tactics)
=>
    (research ri-parthian-tactics)
)

;研究科技-封建年代-马厩-研究血统
(defrule
    (can-research-with-escrow ri-bloodlines)
=>
    (research ri-bloodlines)
)

;研究科技-城堡年代-马厩-研究驯马术
(defrule
    (can-research-with-escrow ri-husbandry)
=>
    (research ri-husbandry)
)

;研究科技-城堡年代-马厩-研究轻骑兵
(defrule
    (can-research-with-escrow ri-light-cavalry)
=>
    (research ri-light-cavalry)
)

;研究科技-帝王年代-马厩-研究骑士
(defrule
    (can-research-with-escrow ri-cavalier)
=>
    (research ri-cavalier)
)

;研究科技-帝王年代-马厩-研究重装骆驼兵
(defrule
    (can-research-with-escrow ri-heavy-camel)
=>
    (research ri-heavy-camel)
)

;研究科技-帝王年代-马厩-研究强力轻骑兵
(defrule
    (can-research-with-escrow ri-hussar)
=>
    (research ri-hussar)
)

;研究科技-帝王年代-马厩-研究游侠
(defrule
    (can-research-with-escrow ri-paladin)
=>
    (research ri-paladin)
)

;研究科技-城堡年代-攻城武器厂-研究中型投石车
(defrule
    (can-research-with-escrow ri-onager)
=>
    (research ri-onager)
)

;研究科技-城堡年代-攻城武器厂-研究弩炮
(defrule
    (can-research-with-escrow ri-scorpion)
=>
    (research ri-scorpion)
)

;研究科技-帝王年代-攻城武器厂-研究火炮
(defrule
    (can-research-with-escrow ri-bombard-cannon)
=>
    (research ri-bombard-cannon)
)

;研究科技-帝王年代-攻城武器厂-研究中型冲车
(defrule
    (can-research-with-escrow ri-capped-ram)
=>
    (research ri-capped-ram)
)

;研究科技-帝王年代-攻城武器厂-研究重型弩炮
(defrule
    (can-research-with-escrow ri-heavy-scorpion)
=>
    (research ri-heavy-scorpion)
)

;研究科技-帝王年代-攻城武器厂-研究重型投石车
(defrule
    (can-research-with-escrow ri-siege-onager)
=>
    (research ri-siege-onager)
)

;研究科技-帝王年代-攻城武器厂-研究重型冲车
(defrule
    (can-research-with-escrow ri-siege-ram)
=>
    (research ri-siege-ram)
)

;研究科技-城堡-研究征兵术
(defrule
    (can-research-with-escrow ri-conscription)
=>
    (research ri-conscription)
)

;研究科技-城堡-研究围墙
(defrule
    (can-research-with-escrow ri-hoardings)
=>
    (research ri-hoardings)
)

;研究科技-城堡-研究工兵术
(defrule
    (can-research-with-escrow ri-sappers)
=>
    (research ri-sappers)
)

;研究科技-城堡-升级属于玩家选择的文明的特色单位
(defrule
    (can-research-with-escrow my-unique-unit-upgrade)
=>
    (research my-unique-unit-upgrade)
)

;研究科技-城堡-研究属于玩家选择的文明的特色科技
(defrule
    (can-research-with-escrow my-unique-research)
=>
    (research my-unique-research)
)

;暗中增加资源
(defrule
    (true)
=>
    (enable-timer 9 0)
    (disable-self)
)
(defrule
    (timer-triggered 9)
=>
    (cc-add-resource food 1000)
    (cc-add-resource wood 1000)
    (cc-add-resource gold 1000)
    (cc-add-resource stone 1000)
    (disable-timer 9)
    (enable-timer 9 200)
)

(defrule
    (true)
=>
    (enable-wall-placement 2)
    (disable-self)
)
(defrule
    (current-age >= castle-age)
    (stone-amount > 500)
    (can-build-wall 2 stone-wall-line)
=>
    (build-wall 2 stone-wall-line)
)
(defrule
    (or
        (wall-completed-percentage 2 >= 15)
        (wall-completed-percentage 1 >= 15)
    )
    (or
        (can-build-gate 2)
        (can-build-gate 1)
    )
=>
    (build-gate 2)
    (build-gate 1)
)


;设置船坞的策略
(defrule
    (true)
=>
    (set-strategic-number sn-dock-defend-priority 1)
    (set-strategic-number sn-minimum-water-body-size-for-dock 10)
    (disable-self)
)


;士兵特性
(defrule
    (true)
=>
    (set-strategic-number sn-task-ungrouped-soldiers 1)
    (set-strategic-number sn-enemy-sighted-response-distance 20)
    (set-strategic-number sn-percent-enemy-sighted-response 20)
    (set-difficulty-parameter ability-to-dodge-missiles 20)
    (set-difficulty-parameter ability-to-maintain-distance 3)
    (disable-self)
)

;村民采集距离
(defrule
    (true)
=>
    (set-strategic-number sn-maximum-food-drop-distance 50)
    (set-strategic-number sn-maximum-wood-drop-distance 50)
    (set-strategic-number sn-maximum-gold-drop-distance 50)
    (set-strategic-number sn-maximum-stone-drop-distance 50)
    (set-strategic-number sn-maximum-hunt-drop-distance 25)
    (set-strategic-number sn-maximum-fish-boat-drop-distance 25)
    (disable-self)
)

;生产建筑-城镇中心
(defrule
    (building-type-count town-center less-than 10)
    (can-build town-center)
=>
    (build-forward town-center)
)

;维持人口
(defrule
    (housing-headroom less-than 10)
    (population-headroom greater-than 0)
    (can-build house)
=>
    (build house)
)

;生产建筑-房屋
(defrule
    (building-type-count house less-than 90)
    (can-build house)
=>
    (build-forward house)
)

;主要进攻规测
(defrule
    (game-time > 0)
    (defend-soldier-count >= 0)
=>
    (attack-now)
    (enable-timer 10 100)
    (disable-self)
)

(defrule
    (timer-triggered 10)
    (defend-soldier-count >= 0)
=>
    (set-strategic-number sn-number-attack-groups 20)
    (set-strategic-number sn-maximum-attack-group-size 50)
    (set-strategic-number sn-minimum-attack-group-size 20)
    (set-strategic-number sn-percent-attack-soldiers 100)
    (set-strategic-number sn-attack-intelligence 1)
    (attack-now)
    (disable-timer 10)
    (enable-timer 10 100)
)

大家应该知道,以上不包含不动AI,数字AI,需要者可以将以下脚本考入AI中

;使村民不动开始
(defrule
    (true)
=>
    (set-strategic-number sn-maximum-food-drop-distance 0)
    (set-strategic-number sn-maximum-wood-drop-distance 0)
    (set-strategic-number sn-maximum-gold-drop-distance 0)
    (set-strategic-number sn-maximum-stone-drop-distance 0)
    (disable-self)
)

(defrule
    (true)
=>
    (set-strategic-number sn-percent-civilian-gatherers 0)
    (set-strategic-number sn-percent-civilian-builders 0)
    (set-strategic-number sn-percent-civilian-explorers 0)
    (disable-self)
)
;使村民不动结束

;使士兵不动开始
(defrule
    (true)
=>
    (set-strategic-number sn-task-ungrouped-soldiers 0)
    (disable-self)
)
;使士兵不动结束


(defrule

    (taunt-detected  1  1 );检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 1);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   1);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 1)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  2);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 2);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   2);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 2)

   (disable-self);关闭规则,可要可不要。

)
(defrule

    (taunt-detected  1  3);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 3);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   3);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 3)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  4);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 4);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   4);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 4)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  5);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 5);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   5);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 5)

   (disable-self);关闭规则,可要可不要。

)


(defrule

    (taunt-detected  1  6);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 6);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   6);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 6)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  7);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 7);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   7);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 7)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  8);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 8);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   8);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 8)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  9);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 9);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   9);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 9)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  10);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 10);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   10);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 10)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  11);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 11);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   11);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 11)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  12);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 12);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   12);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 12)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  13);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 13);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   13);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 13)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  14);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 14);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   14);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 14)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  15);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 15);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   15);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 15)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  16);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 16);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   16);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 16)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  17);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 17);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   17);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 17)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  18);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 18);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   18);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 18)

   (disable-self);关闭规则,可要可不要。

)

(defrule

    (taunt-detected  1  19);检测到玩家1(也就是玩家啦)输入的数字XXX(好象是1~255之间的任意整数都行)

=>

   (set-signal 19);回馈一个信号XXX给触发系统

   (acknowledge-taunt   1   19);注销掉玩家1的发送的嘲弄数字XXX,这条可要可不要
   (acknowledge-taunt this-any-computer 19)

   (disable-self);关闭规则,可要可不要。

)







本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册翔鹰会员(昵称)

x
回复

使用道具 举报

5

主题

0

精华

261

积分

男爵

耕战
40
鹰币
711
天龙币
0
回帖
44

翔鹰建站十周年纪念章

附庸关系0
 楼主| 发表于 2014-1-13 13:04:42 | 显示全部楼层
帅气的蚂蚁 发表于 2014-1-12 23:27
这到底是 战役AI还是对战AI?

对战,
回复

使用道具 举报

5

主题

0

精华

261

积分

男爵

耕战
40
鹰币
711
天龙币
0
回帖
44

翔鹰建站十周年纪念章

附庸关系0
 楼主| 发表于 2014-1-13 17:48:56 | 显示全部楼层
RRCC 发表于 2014-1-12 19:05
传说中不适用于战役的战役AI

加上这条这个AI10000%不适合做战役了
符合以下条件宣布失败
(defrule
    (building-type-count town-center less-than 1)
    (building-type-count castle < 1)
    (soldier-count < 1)
    (unit-type-count-total villager < 1)
=>
    (set-goal 10 1)
)
(defrule
    (goal 10 1)
=>
    (delete-building dock)
    (delete-building town-center)
    (delete-building monastery)
    (delete-building barracks)
    (delete-building archery-range)
    (delete-building stable)
    (delete-building castle)
    (delete-building siege-workshop)
    (delete-building watch-tower)
    (delete-building guard-tower)
    (delete-building keep)
    (delete-unit villager)
)
(defrule
    (goal 10 1)
    (building-type-count dock less-than 1)
    (building-type-count town-center less-than 1)
    (building-type-count monastery less-than 1)
    (building-type-count barracks less-than 1)
    (building-type-count archery-range less-than 1)
    (building-type-count stable less-than 1)
    (building-type-count castle less-than 1)
    (building-type-count siege-workshop less-than 1)
    (building-type-count watch-tower less-than 1)
    (building-type-count guard-tower less-than 1)
    (building-type-count keep less-than 1)
    (unit-type-count-total villager less-than 1)
=>
    (resign)
    (disable-self)
)
回复

使用道具 举报

0

主题

0

精华

492

积分

子爵

耕战
39
鹰币
1098
天龙币
0
回帖
61
附庸关系0
发表于 2014-1-16 21:26:44 | 显示全部楼层
大概什么水平的AI,适合up1.4么?
回复

使用道具 举报

5

主题

0

精华

261

积分

男爵

耕战
40
鹰币
711
天龙币
0
回帖
44

翔鹰建站十周年纪念章

附庸关系0
 楼主| 发表于 2014-1-17 12:19:39 | 显示全部楼层
IamAlian 发表于 2014-1-16 21:26
大概什么水平的AI,适合up1.4么?

难度取决于;暗中增加资源
(defrule
    (true)
=>
    (enable-timer 9 0)
    (disable-self)
)
(defrule
    (timer-triggered 9)
=>
    (cc-add-resource food 1000)
    (cc-add-resource wood 1000)
    (cc-add-resource gold 1000)
    (cc-add-resource stone 1000)
    (disable-timer 9)
    (enable-timer 9 200)
)
这一条指令,意思是暗中增加资源,循环,每200秒增加1000黄金、木材、食物、石头。
如果没有这一条指令难度会大大降低,至于可不可以用于1.4版嘛,我没试过。自己创造AI可以用用工具嘛,工具下载地址我忘了,这是工具

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册翔鹰会员(昵称)

x
回复

使用道具 举报

本版积分规则

排行榜|小黑屋|翔鹰帝国

GMT+8, 2024-11-23 16:51 , Processed in 0.132991 second(s), 66 queries , File On.

Powered by Hawk Studio  QS Security Corp.® Licensed

Copyright © 2001-2023, Hawkaoe.net All Rights Reserved

快速回复 返回顶部 返回列表