TSA Builder 1.2a - Major bugfix release

Upload your latest creations here.
Please note that by posting comments to posts in this forum you forfeit your personal copyright on whatever you post. AI Scripters reserves the right to re-use objective comments in script reviews without requiring the posting author's permission. Credit, where appropriate will be given in such cases.
User avatar
AGT_Ishan
Forumer
Posts: 32
Joined: Sun Oct 14, 2012 9:11 pm
Location: The Universe
Contact:

TSA Builder 1.2a - Major bugfix release

Post by AGT_Ishan »

Hello All Scripters!
I made a utility called "TSA Builder". It speeds up the process of making TSA rules by automatically generating them.
It accepts the settings for the tsa from the user and generates the code.
Image
Image
Image

Comments and suggestions are welcome!

Edit 1:
I edited the program so that it would work properly. For details, see UnfairestEel's post below

Edit 2:
The Above update made it even worse. The problem has now been fixed once and for all.
Attachments
TSA Builder 1.2a.zip
Version 1.2a -- Enjoy! (Fixed some technical details) & The progressbar now works!
(102.45 KiB) Downloaded 322 times
Last edited by AGT_Ishan on Wed Mar 13, 2013 11:54 pm, edited 3 times in total.
Image
Image
"The Lord God is subtle, But Malicious He is Not" -- Albert Einstein

User avatar
UnfairestEel
Waheguru
Posts: 1835
Joined: Sat Jul 30, 2011 4:31 pm

Re: TSA Builder 1.0

Post by UnfairestEel »

Geez this looks good!
One issue though:
The rules are in the wrong order for it to work properly.

For example instead of:
(defrule
(strategic-number sn-maximum-town-size == 40)
(not(enemy-buildings-in-town))
(goal g-tsa gv-on)
=>
(set-strategic-number sn-maximum-town-size 45)
)
(defrule
(strategic-number sn-maximum-town-size == 45)
(not(enemy-buildings-in-town))
(goal g-tsa gv-on)
=>
(set-strategic-number sn-maximum-town-size 50)
)
(defrule
(strategic-number sn-maximum-town-size == 50)
(not(enemy-buildings-in-town))
(goal g-tsa gv-on)
=>
(set-strategic-number sn-maximum-town-size 55)
)

it should be
(defrule
(strategic-number sn-maximum-town-size == 50)
(not(enemy-buildings-in-town))
(goal g-tsa gv-on)
=>
(set-strategic-number sn-maximum-town-size 55)
)
(defrule
(strategic-number sn-maximum-town-size == 45)
(not(enemy-buildings-in-town))
(goal g-tsa gv-on)
=>
(set-strategic-number sn-maximum-town-size 50)
)
(defrule
(strategic-number sn-maximum-town-size == 40)
(not(enemy-buildings-in-town))
(goal g-tsa gv-on)
=>
(set-strategic-number sn-maximum-town-size 45)
)

simply because (enemy-buildings-in-town) gets updated every pass, not every rule
Knowledge is Time.
This simple fact can be derived from these beliefs:
Time is Money.
Money is Power.
Knowledge is Power.
Therefore, Knowledge is Time.
Q.E.D.

User avatar
AGT_Ishan
Forumer
Posts: 32
Joined: Sun Oct 14, 2012 9:11 pm
Location: The Universe
Contact:

Re: TSA Builder 1.0

Post by AGT_Ishan »

UnfairestEel wrote: The rules are in the wrong order for it to work properly.
I'm working on it. Maybe it will help to put my loops in the reverse order. I'll look at the problem tonight if I can.
Visual Basic 2010 Express is not being very helpful with it's object-orientation.

Edit:
I fixed it! Try the new version. Thanks man!
Image
Image
"The Lord God is subtle, But Malicious He is Not" -- Albert Einstein

scripter64
Waheguru
Posts: 5891
Joined: Fri Jan 16, 2009 8:36 pm

Re: TSA Builder 1.1

Post by scripter64 »

Great idea and nicely formatted :)

Archon
Waheguru
Posts: 1905
Joined: Sat Nov 08, 2003 9:22 am

Re: TSA Builder 1.1

Post by Archon »


User avatar
AGT_Ishan
Forumer
Posts: 32
Joined: Sun Oct 14, 2012 9:11 pm
Location: The Universe
Contact:

Re: TSA Builder 1.1

Post by AGT_Ishan »

Scripter64 wrote:Great idea and nicely formatted :)
Thanks

That's for military superiority as far as I can tell. If you're trying to say that I plagiarized (copied) it, you're wrong. I never even saw that thread before now.I respect what he made. I think his creation is quite good from the my P.O.V. as I do not even know any C# or C++ . All I know is Visual Basic which I learned on my own. Some M.S.D.N. Documentation is all you need :)

On the other hand, if you're saying that these two are similar, then I agree with you fully :D

BTW: I'd like to break the ice between us.
Image
Image
"The Lord God is subtle, But Malicious He is Not" -- Albert Einstein

User avatar
Finaldeath
Guru
Posts: 961
Joined: Tue Mar 27, 2012 6:02 am

Re: TSA Builder 1.1

Post by Finaldeath »

Might be worth noting that with User Patch (where all the cool kids are) there are ways to do what you've setup here in a few rules for any amount of TSA size. :)

Not to say you can't develop nice tools for other bits of an AI perhaps (which is perhaps what Archon was getting at), but that repetitive rules like these for TSA are not needed as much with UP.
Finaldeath

Writing a set of tutorials - My own AI is super secret development!

User avatar
AGT_Ishan
Forumer
Posts: 32
Joined: Sun Oct 14, 2012 9:11 pm
Location: The Universe
Contact:

Re: TSA Builder 1.1

Post by AGT_Ishan »

Finaldeath wrote:Might be worth noting that with User Patch (where all the cool kids are) there are ways to do what you've setup here in a few rules for any amount of TSA size. :)
I know... ER told me that shortly after I posted it.
Not to say you can't develop nice tools for other bits of an AI perhaps (which is perhaps what Archon was getting at), but that repetitive rules like these for TSA are not needed as much with UP.
Can you give me some ideas please?
Image
Image
"The Lord God is subtle, But Malicious He is Not" -- Albert Einstein

Archon
Waheguru
Posts: 1905
Joined: Sat Nov 08, 2003 9:22 am

Re: TSA Builder 1.1

Post by Archon »

AGT_Ishan wrote:Can you give me some ideas please?
You can do a military comparison, as in the thread I linked.

User avatar
Finaldeath
Guru
Posts: 961
Joined: Tue Mar 27, 2012 6:02 am

Re: TSA Builder 1.1

Post by Finaldeath »

Mmm...maybe...

Market buy/sell rules
Enemy army composition tallying into categories for counter unit production
Additional farm rules

Then again a few of these can be again more easily be done in a few UP rules. :)
Finaldeath

Writing a set of tutorials - My own AI is super secret development!

Post Reply