123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|56|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> C/C++/C#/Other -> timing problem in java

Fri, 29 Jun 2012, 05:46
jedimastersterli
I've been working on a particle filter as a form of AI tracking function.

I want to use a coordinate ascent function to find optimum values for some control parameters but I've hit a snag.

I put the filter into a simple forever while loop to make sure it could work for a large number of iterations. It get's through about 9 iterations and stops. I think it's used too much memory or processor time so some kind of control just shut it down, but i'm not sure.

even to be able to get data for a control ascent function i need to be able to filter a set of particles 20 times and run at least 100 different sets of particles for each ascent step and run 100 steps. each set has 1000 particles and some of the loop functions that control particle behavior run 1000000 times

i know my computer has the power to run this since it's really only one particle set at a time and while writing and testing the code I never had this problem. I think all I need to do is make the program wait between each filter so as not to gum itself up. I could do this with a scanner.nextLine(); but I don't much fancy the idea of pressing the enter key 20000 times.

here's the loop


if you need to see more of the code let me know. I didn't want to insert all 10 pages of it

the resample function calls other functions so i may need to wait on them in turn. I really don't know and I don't know how to do that.
Fri, 29 Jun 2012, 23:19
jedimastersterli
I found my problem.

My sensors where not bounded so a value of 0 was throwing off my probability and making a while loop a forever loop

also the increments of ascent where initialized so that they kept setting my gates to 0 and once again making forever loops.

I think I've got it figured out now. Now I just gotta let it run all night and hope it doesn't do some other weirdness.