Gamestudio Links
Zorro Links
Newest Posts
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
Zorro version 3.0 prerelease!
by TipmyPip. 02/24/26 17:09
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (Martin_HH, TipmyPip, AndrewAMD, Grant, USER0328), 5,287 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Custom functions in cycle data .c files #432580
11/08/13 16:53
11/08/13 16:53
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
[Train] with NumWFOCycles = 16 produces 16 .c files in Zorro's Data/ dir.
I have cycle-specific models, and I would like Zorro to use them for [Test]. I figured I could put a cycle-specific predict() function in each of the .c data files, and the main run() function would call the right one depending on the cycle number. I am doing this because I want a more complex nnet than PERCEPTRON (more than one layer, with output layer larger than 1.)

In barium_strat.c I have
Code:
void predict(var *xrow, var *pcx, var *L0, var *L1, var *L2);
var xrow[95];
var pcx[95];
var L0[96];
var L1[253];
var L2[5];
# snip
function run() {
# snip
# Populate xrow.
  predict(xrow, pcx, L0, L1, L2);
# snip
# Maybe enter some orders based on values in L2.
}



And in each Data/barium_strat_??.c file I have a
Code:
function predict(var *xrow, var *pcx, var *L0, var *L1, var *L2) {
  # Populate pcx L0, L1, L2
}


For [Test] I see the following error during compile. Then the test runs, but the predict function is never called, and the values of the output variables pcx, L0, L1, L2 are always unmodified.

Code:
barium_strat compiling................................................
Undefined function: predict. assets....
Walk-Forward Test: barium_strat portfolio 2009..2013



Clearly I have some misunderstanding. If it's not too much trouble, can you point me in a better direction? Or am I trying to do something impossible?

Last edited by GPEngine; 11/08/13 16:54. Reason: added contents of data file example
Re: Custom functions in cycle data .c files [Re: GPEngine] #432714
11/13/13 03:55
11/13/13 03:55
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
It occurred to me that I could consult the WFOCycle variable and have more control.

Re: Custom functions in cycle data .c files [Re: GPEngine] #432719
11/13/13 07:48
11/13/13 07:48
Joined: Jul 2000
Posts: 28,075
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,075
Frankfurt
Yes. Only generated rules are automatically included. For other .c files you 'll need an #include statement. Inside the file you can use the WFOCycle variable for separating the cycles.


Moderated by  Petra 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1