Trinity-Automata-Research / dsmodels

The dsmodels domain-specific-language for visualizing dynamical systems in R.
http://www.cs.trinity.edu/~sfogarty/dsmodels/index.html
GNU General Public License v2.0
7 stars 0 forks source link

feigenbaum constant, find.period differentiate #183

Open kmclaren-trinity opened 5 years ago

kmclaren-trinity commented 5 years ago

find.period cant differentiate between slowly converging fixed points and close periodic points

An orbit that oscillate about a fixed point and slowly converges (i.e. eventually fixed point) may be classified as a periodic point. Similarly, an periodic orbit/cycle of {c+delta, c-delta} may be classified as a fixed point if delta is small enough. (2*delta<epsilon) This means we can't approximate feigenbaum constant very well.

potential solutions:

kmclaren-trinity commented 5 years ago

~related, dscurve always uses default arguments for find.period, even when user specified ones are given.~ now fixed, added a do.call

kmclaren-trinity commented 5 years ago

This is currently implemented. its effect is untested. Potential solution: before testing for periodicity, first check if the function has converged.

Take a sample of the next maxPeriod points, iterate a high power of two, take a second sample of the next maxPeriod points. Then we can test for convergence by looking at the magnitude of abs(firsSample- secondSample))

It should be very low if the function has converged. currently we reuse epsilon, should it have its own, smaller tolerance?

kmclaren-trinity commented 5 years ago

Also, find.period only checks one full period. it should check multiple periods out. i.e. for 2 periodic instead of comparing points 1,2 to points 3,4, also compare to points 5,6, points 7,8,...

Find.period checks proper names names, but apply fixes the names to x,y. This wont be a problem, but is unnecesary. (dsmodel line 441)

kmclaren-trinity commented 5 years ago

~New(?) issue: narrow crosses intervals.~

~i.e. period 1 interval is 0-3.01, period 2 interval is 2.99-3.4~

~I beleive the problem is in recur narrow~ fixed

kmclaren-trinity commented 5 years ago

Runtime is starting to become an issue. Searching for higher periodicity will require an increasing amount of iterations to be computed. The fourth bullet point is looking more neccesary.

Alternatively, we can wait to compute further iterations until after previous ones fail. i.e. wait to compute four iterations until we know the point is not fixed.

kmclaren-trinity commented 5 years ago

how long does it take for points to converge? in test case 183, line 28-40, it seems like 4000 iterations is not enough. going an additional 128 causes points to move a bit more.