Page 1 of 7

LuSnake suitable for noob 6.91 2020/12/17

Posted: Fri Nov 22, 2019 3:46 am
by JackyLin
Hello everyone, I am a new ai scripter, this is the first one I wrote without cheating ai.

In fact, I started making it during the HD era, which cost me a lot of effort. Because I don't know English, my progress is slow.
It can only play 50% of the original strength of DE in WK.

Any suggestions are welcome. This will make me progress!




LuSnake is compatible with both WK and DE. Not compatible with HD!

With Tournaments is the game version, without any cc commands.




https://www.ageofempires.com/mods/details/2684/

This is a non-cheat AI, with scores, D, Super, 1vN is a cheating version, so that players of all levels can find their own appropriate strength. With the word OS, it is suitable for playing on closed maps such as Oasis, Hessen, and michi.
The pre-emptive version of the pre-release strength is only about the medium level of computer gamers, and the late (50 points later) is the hardest and harder than the computer gamer.
Suitable for: No cheats about 900+, newcomers who just started playing this game are very suitable.

Note: This AI is attacked by the tower, pressed by the castle, and violently angered by the TC. Please do not do this for this ai...
Suitable maps: waterless maps, only pure land, the best in Arabia
Suitable mode: the conquest of force
Suitable for population: At least 500





Recommended game settings

Information piece: Standard or Ten ratio resource Not Food
Game: Random Map
Map type: Custom
Location: Arabia
Map size: Large size (8 players or less)
Difficulty: Extreme
Gamer: 2~8
Resources: low
Population: At least 500
Game speed: any
Show map: any
The beginning era: the dark age
The end era: the era of emperors
Victory: Conquering by force

Team community: open
Lock the team: open
Complete technology: any
Locking speed: any
Allow the use of secret technology: any
Recording game: Any

LuSnake Gamer Civilization: Arbitrary
LuSnake player team: Any

Human ally Taunts to AI:
31=Attack now
45=Retreat now
36=Ban attack now
23=Cancel ban attack now

Host Taunts to AI (remember to turn on full frequency):
104=Don't surrender
105=Surrender allowed
112=Not straight castle
113=Straight castle
200=Start metamorphosis mode
201=Cancel metamorphosis mode
202=Increase 100 tricolor
203=Increase 300 tricolor
204=Increase 500 tricolor
205=Increase 1000 tricolor
206=Increase 2000 tricolor
222=Attack now
223=Retreat now
224=Ban attack now
225=Cancel ban attack now

Re: LuSnake suitable for noob 2.92

Posted: Fri Nov 22, 2019 7:31 am
by Esty
Hi Jackylin and thx for the upload.
Suggestions about you first lumber-camp :
Be sure to have added (resource-found wood) each time you build LC. And you should use (set-strategic-number sn-allow-adjacent-dropsites 1) to force the lumber-camp to be built closer to the trees. set to zero, there will be one tile between the resource and the building.

Your AI is probably building too many (useless) military buildings, at least with the version which doesn't cheat. And for a better control of the placement of ur buildings, here is an exemple :

(defrule
(building-type-count-total barracks <= 1) ; you want 2 barracks
(can-build barracks)
(up-pending-objects c: barracks < 1) ; the barracks will be built one by one
=> (up-assign-builders c: barracks c: 1) ; number of villagers selected to be the builders
(up-set-placement-data my-player-number -1 c: 3) ; read bellow*
(set-strategic-number sn-placement-zone-size 5) ; read bellow**
(up-build place-control 0 c: barracks))

* => -1 means "from the position of your main TC" ; a positive value (here c: 3) means it will be built in the direction of your enemy. A negative value will make it being built in the back.
** => The value u type (here 5) allows the building to be built at 5 tiles around the position chosen, usefull in case objects can obstruct the construction

Ur script is already quiet decent overall, for a first one. GJ

Re: LuSnake suitable for noob 2.94

Posted: Mon Nov 25, 2019 8:35 am
by JackyLin
2019/11/25 Update version 2.94
1. LuSnake will now catch the deer.
2. No longer wait for the first pig to finish before going to pull the second one.
3. LuSnake will now control the sheep. (One kill, not Sanyang Kaitai.)
4. It will be from the D wall now.

Re: LuSnake suitable for noob 2.94

Posted: Tue Nov 26, 2019 6:56 am
by Promiskuitiv
Sounds good, thanks for the update!

Re: LuSnake suitable for noob 2.941

Posted: Tue Nov 26, 2019 10:36 pm
by JackyLin
2019/11/27 update 2.941
1. Fix LuSnake will not have any response when attacked in non-DE environment.

2019/11/27 更新2.941版
一.修正LuSnake在非DE環境中在遭受攻擊時不會有任何反應。

Re: LuSnake suitable for noob 2.941

Posted: Fri Nov 29, 2019 10:48 am
by LightTree
Thx for new AI and good luck :).

Re: LuSnake suitable for noob 2.95

Posted: Sun Dec 01, 2019 10:43 am
by JackyLin
LuSnake 2019/12/02 update 2.95
1. Without launching a total offensive, AI will retreat as appropriate:
1. When the number of troops lags significantly behind the enemy.
2. When attacked by enemy castle or TC without rushing. (Excluding pressure reduction, TC explosion)

Two. OS version will hit the tree.

3. Added 2300 and 2400 versions.

Re: LuSnake suitable for noob 2.95

Posted: Tue Dec 03, 2019 3:48 am
by KiiNgZoNe
Welcome! As a fellow noob scripter, let's help each other out!

I've done a few games with LuSnake vs Vetrix, all on 1v1, 2v2, 3v3, and 4v4.

Vetrix won all of them, but actually, the main problem of LuSnake lies upon getting to the Castle Age. It will briefly defend itself well after getting attacked in the early stages, but it can only do so much because there's almost little to no economy backing up its armies, before eventually collapsing due to not being able to support its defense anymore. I haven't looked at the file yet, but I'm going to assume for now that either you're doing escrows, or it's scripted for LuSnake to prioritize the army composition more.

LuSnake creates A LOT of TCs, but almost all the TCs are either idle, or at least 1 or 2 out of like 7 TCs are training villagers, however, inconsistently, because I think it prioritize its army a bit too much. This was also Vetrix's most recurring problem in the past: economy and proper advancements during Castle Age, so I feel both the frustration and the pain (whatever you feel which is which) :head :head :head

LuSnake will definitely be a solid AI once the macro side of it gets improved. I also learned important things from the matches, so I updated Vetrix a little bit (although no major improvements will be done anymore, only fixes of silly mistakes for it to perform properly) and hopefully it can perform as well as it's expected to be.

Best of luck! Have fun, and enjoy scripting! :dance

Re: LuSnake suitable for noob 2.96

Posted: Wed Dec 04, 2019 8:10 am
by JackyLin
2019/12/05 update 2.96
I. Added the mechanism of attack if our army is much larger than the enemy army.
2. Correct the logic of LuSnake's retreat mechanism.

Re: LuSnake suitable for noob 2.97

Posted: Thu Dec 05, 2019 6:18 am
by JackyLin
LuSnake 2019/12/05 update 2.97
1. Improve the detection methods for front, TC explosion, tower attack, and pressure castle. (There was a very serious mistake in the previous version, which will count the buildings in your opponent's home.)
Reminder: The DE module currently has a new serious bug, that is, the module in the hands of subscribers will not be automatically updated, so you need to cancel the LuSnake subscription and then subscribe to the latest version.