Lets say I want to structure a minimization problem. Would WZ carry out matrix algebra with WZ variables and functions if I directly transfer code written in C?
Is there a better way of doing this in WZ?
I was thinking of playing around with dynamically weighting the "count" commands. Good idea, bad idea?
For instance: PlayerX discounts two oil derricks according to distance from playerX's existing buildings. The discounting must be done by deciding the minimal group required to be sent to each derrick versus alternative allocations of units in that group to other parts of the script.
Best regards.
AI Scripting: Matrix Algebra?
-
Per
- Warzone 2100 Team Member

- Posts: 3780
- Joined: 03 Aug 2006, 19:39
Re: AI Scripting: Matrix Algebra?
You should consider doing this in the lua branch, where you have the full Lua language at your disposal. Hopefully someone (perhaps you?
) will finish the Lua port soon.
-
thelion
- Rookie

- Posts: 21
- Joined: 12 Aug 2009, 20:07
Re: AI Scripting: Matrix Algebra?
Which version of lua is the scripting going to be ported over into? 5.0 or 5.1?
I'll try to see to some individual functions, assuming that all the other WZ functions will operate the same after porting.
Also, I'd like to use a freely available lua module in scripting, because of the matrix invert function. Would it be fine to use non-standard lua modules for scripting? (Else should I work on getting a similar function without using other modules, because of licenses?)
I'll try to see to some individual functions, assuming that all the other WZ functions will operate the same after porting.
Also, I'd like to use a freely available lua module in scripting, because of the matrix invert function. Would it be fine to use non-standard lua modules for scripting? (Else should I work on getting a similar function without using other modules, because of licenses?)
-
Per
- Warzone 2100 Team Member

- Posts: 3780
- Joined: 03 Aug 2006, 19:39
Re: AI Scripting: Matrix Algebra?
I am just posting to say that I don't know the answers to your questions.
Might as well check out the lua branch and see for yourself. Or hope that the lua branch author comes back from wherever he is soon.
Might as well check out the lua branch and see for yourself. Or hope that the lua branch author comes back from wherever he is soon.