Jon’s PhD Journal

March 26, 2007

On the Java path issue case …

Filed under: Coding — JDE @ 5:45 pm

Positive the simulation isn’t working due to a Java path foul-up. Found this, which may be of use.

More writing …

Filed under: Notes — JDE @ 9:40 am

More writing up of the complexity report today. Only ~2/5 journals to go, I think. I then having the interesting challenge of turning it into a cohesive report, which should be interesting !! Seems to be a little jarring at the moment.

March 25, 2007

Coding Sunday …

Filed under: Notes — JDE @ 9:39 pm

Started to code aroud the loop section of the simulation, and guess what? The code has stopped working!! *sigh* Strangely, it appears to be a Java error … and I updated Java yesterday, 24-Mar-07, didn’t I? D’oh-slash-Grrr — regression testing now required it seems! Although an importat lesson to learn: don’t arbitrarily upgrade the coding language without thinking about it! Annoyingly currently working offline, so can’t search the net to see what I need to do: I might need to reinstall the Java3D component. However, insterestingly I only upgraded the JRE, not the JDK, so don’t see what should have changed. Given up and continued with writing up complexity report …

Installed Subversion yesterady, so need a chance to put it into action. However, I was reading the TortoiseSVN helpfiles, and it appears it’s not a case of just importing a file willy-nilly: you need to pre-plan what the directory system is going to look like, which I didn’t think you needed to do.

March 22, 2007

Thursday writing up complexity …

Filed under: Notes — JDE @ 7:54 pm

Still trying to write up complexity, and it’s hurting my head — ow. I think one of the issues I have is that I’m not sure if I’ve covered enough material … hmm, but am going to try to write up everything I have to date at least. Interestingly going through my notes, it’s interesting to see how many time I have written “Quite frustrtating” — it’s more than 2 to be sure!

In short, still going strong …!

March 19, 2007

Monday: compiling the complexity theory report …

Filed under: Notes — JDE @ 11:07 pm

(As a backdrop to today’s antics, have been suffering flatmate Tom’s whoops and hollers of achievement and disappointment as he attempts to install Vista onto RAID0 drives — *sigh*)

Today I’m looking over my notes from complexity with the idea of turning my notes into a coherent document … hmmm. Should be interesting, as there’s 26 pages of A4 notes. First thing is to set up the body of the report (DONE).

This is actually proving quite challenging: I’m working on the introduction today, and unfortunately from electronic copies only. (Car issues are preventing me from getting to a printer for the next few days). It’s difficult to hold the contents of 26 pages of notes in memory at once!

Hmm okay whilst this isn’t perfect, the system I’m using at the moment is as such: I’ve copied all my relevant notes from my blog to Word. I’m now trawling through the Word document in reverse chronological order, adding bits to different parts of the report as I go. It’s slow work, but it seems to make sense. Going to bed now though ;-)

March 17, 2007

A sort-of weekly review …

Filed under: Coding — JDE @ 12:58 pm

Right, quite quiet on the blogging front this week, so a quick shake down of the week’s action:

  • Monday: there’s a blog posting for this
  •  Tuesday: bit more reading — didn’t write it up though
  • Wednesday: swearing at computer as attempted to get everything sorted for Thursday’s trip to Reading: videos, print-outs, etc
  • Thursday: trip to Reading
  • Friday: Installed SAS … which took *ages*
    • will now factor in teaching myself SAS as well!

Now one of the pertinent things Will said to me on Thursday that’s really stuck and resonated is about ensuring that as I now have a simulation capable of creating data, is that I need to be able to map the code to the data it produces. I’m going to do a bit of investigation to see what is the best thing to do in this space: how to store the source code and data it produces, on a date basis, with some details of the parameters that have been changed/modified. Needless to say, this is very much a housekeeping activity, but an essential one.

Today I’m trying to change the while loop in the simulation’s FlockBEhaviour class at about line 85 to a for loop, so I can tell the simulation to run for a certain number of iterations, and then stop. However, I’ve mixed up a counter variable with the var. that the system uses to iterate over the boids – dang! So the plan is to:

  • get the number of boids in the simulation
  • at the end of the for loop, check to see if the var. counting the boids has exceeded the number of boids in the simulation: if it has, reset it to 0, if else i++.
  • iterate around the loop as planned

… And from looking at the code to date, and the esoteric comments around it, dear me do I need a source code control system! The ability to check out code, make changes, re-commit it and be able to diff. files is a huge, massive requirement now!!

Wandered off and have downloaded Subversino (SVN) and TortoiseSVN to manage the above — hope it works!! More details no doubt later …

March 12, 2007

Monday: additional complexity blogging …

Filed under: Notes — JDE @ 9:50 am

In what is hopefully the last journal before I start composing the full report, notes from Towards a theory of everything? – Grand challenges in complexity and informatics, David G Green and David Newth, from Volume 8 of Complexity.org.uk, 2000, p1 – 12:

  1. p2: among the very first questions in complexity theory … is how things organise themselves
  2. p2: how do large-scale phenomena emerge from the simple components?
  3. p2: this issue led to the idea of “holism”(A Koestler, 1967, The Ghost in the Machine, Hutchinson, London), in which objects are regarded not only as discrete entities but also as building blocks within larger structures.
  4. p2: one [mechanism identified] is the role of connectivity in a system, which determines whether sets of objects are isolated or a fully connected system
  5. p2: one of the most important principles is that global phenomena can emerge out of local interactions and processes. For instance, P Hogewerg and B Hesper (1983, The ontogeny of the interaction structure in bumblebee colonies: a MIRROR model, Behav. Ecol. Sociobiol. 12, 271-283) showed that the scoial organisation of bumblebees emerges as a natural consequence of the interactions between simple properties of bumblebee behaviour and of their environment. [JE - then goes on to say how the ideas behind this can be abstracted to cellular automata]
  6. p2 – 3: H Haken (1978, Synergetics, Springer-Verlag, Berlin) … pointed out that in many emergent and self-organizing processes, phase changes (from local to global behaviour) occur at a well-defined critical value of some order parameter. For example, water freezes at a fixed temperature … These properties are now known to be closely related to issues of connectivity.
  7. p3: … the issue of identification is still unclear (1995, JH Holland, Hidden Order: how adaptation builds complexity, University of Michigan Press, Ann Arbor). Sometimes, what we may see as an emergent property of a system is apparent only when an assemblage is considered in a larger context.
  8. p3: many aspects of complexity can be traced back to issues arising from connectivity. Interactions, state changes, neighbourhoods and many other phenomena all define links or connections between objects.
  9. p3: [JDE - NB note that the following has been proposed by the article author himself -- how may citations for each article?] DG Green ({1993, Emergent behaviour in biological systems. Complexity International, 1. http://www.csu.edu.au/ci/vol1/, 39 citations }, {1994, Connectiivity and the evolution of biological systms. J. Biological System 2(1), p91-103, 18 citations }) proved the following theorems:
    1. Theorem 1: the patterns of dependencies in matrix models, dynamical systems, cellular automata, semigroups and partially ordered sets are all isomorphic (def’n) to directed graphs (def’n)
    2. Theorem 2: in any automaton or array of automata, the state space forms a directed graph
  10. p3 (continuing from bullet 9/ above): the implication is that virtually any complex system inherits properties of graphs. The most important of these properties is that, starting from a set of isolated nodes, a phase change in connectivity occurs in any random graph as edges are added to the system (P Erdos and A Renyi, 1960, On the evolution of random graphs. Mat. Kutato. Int. Kozl. 5, 17 – 61). This features of graphs is therefore responsible for many kinds of criticality. DG Green (note article author, 1995, Evolution in Complex Systems. Complexity Internation Volume 2, http://www.csu.edu.ac/ci/vol2) conectures that connectivity underlies all criticality.
  11. p3: several authors (e.g. CG Langton 1990, Computation at the edge of chaos: phase transition and emergent computation. Physica D, 42 (1-3):12 – 37) have proposed that maximum system adaptability lies on the “edge of chaos”. An alternative model (note same author, DG Green 1994 Connectivity and the evolution of biological systems. J. Biological Systems 2 (1), 91 – 103) suggests that systems flip-flop across a “chaotic edge” associated with a phase chanage in their structure or behaviour.
    1. p4: In the edge-of-chaos model, complex systems evolve to lie near or at the critical point, between chaotic and ordered … In the phase shift model [JDE -- i.e. the author Green's -- see bullet 10/ above], external stimuli flips the system across the chaotic edge into a phase where variation predominates.
  12. p5: … an interesting conjecture (originally ascribed to ecologist Bruce Patten, 1975 (Ecosystem linearization: an evolutionary design problem, American Naturalist, 109, 529 – 539) ) is whether the large-scale dynamics of ecosystems are esseentially linear. Natural selection, Patten (1975) proposed, tends to either eliminate non-linear processes or else nullify their effects. He based his hypothesis on the experiences of engineers, who find that linear systems are reliable and desirable, whereas systems with non-linear behaviour are not.
    1. [JDE: however, an interesting point here: do we try to apply linear relationships because we know more about them?]
    2. [JDE from a little further down p6] These ideas raise an important general question: is the linear behaviour observed in complex systems real? Or does it reflect the way we model them? It can be impossible to decide, from the data alone, what sort of model best decribes a process. Unless they are guided by a theory theat demands a particular sort of model, scientists analyzing data tend to look for the simplext equation that fits their observations: the simples model is usually a straight line. This tendency to use linear models in increasd bevause the range of observeations is often limited. Shorts segments of most continuous functions look like straight lines — the shorted the interval, the better the approximation. We often exploit this fact in interpolation. Similarly, scientists observing nature rarely see a process operate over its whole range; sometimes the range of observations is quite restricted. Finally the last point in important because feedback, and external constraints, act to keep a process within a limited range of values, so that the porcess tehds to look linear.

Dang .. that’s as far as I’ve got. Still have a few pages to read, but have gleaned some interesting references: searching Physica D for Chris Langton is quite interesting.

March 11, 2007

Sunday: more coding …

Filed under: Coding — JDE @ 4:57 pm

Back on the case today: trying to work out why I can’t print bird positions to a text file. I’ve moved the code around a little to include a try-catch expression, which compiles okay — the simulation now works. I can get the simulatino to output the results to the screen. However, I can’t get the system to write to a text file for some reason — grr!! This is what happended the last time though … for some reason the code would not dave to a text file, but *something* happened which then enabled it to.

Ahah! Success! I appended a “true” to the code that opens a BufferedWriter, and it now works! Code follows below:

try {
        BufferedWriter out = new BufferedWriter (new FileWriter(“boidposition_out.txt”, true));
        while((b = boidsList.getBoid(i)) != null) {
          b.animateBoid();
          float x = b.getBoidPosX();
          float y = b.getBoidY();
          float z = b.getBoidZ();
                             
          String s_x = Float.toString(x);
          String s_y = Float.toString(y);
          String s_z = Float.toString(z);
         
          String position_result = i + “,” + s_x + “,” + s_y + “,” + s_z + “\n”;
          System.out.print(position_result); // print to screen
         
          out.write(position_result); // print to text file
          i++;
        } // end of while
        out.close();
    } catch (IOException e) {
        System.out.println(“Exception ” + e);
    }

But what happens if I increase the number of birds in the simulation –> 20 (currently have 10) …? I get 20 locations outputted in the text file!!

However, there is an issue: I can’t print the timestep for some reason: i.e. just a counter that increments for each cycle of position changes. Hmm mmore thought is required …

March 9, 2007

Friday coding …

Filed under: Coding — JDE @ 8:22 pm

Picking up from where I left off last week, currently trying to work out which part of the class structure actually tells the birds to update their positions. From looking at the simulation code, the important piece is either in the Boid or FlockBehavior class. However, I can see that an importnat piece of printing boid positions is getting the position vector into some other form, which I think will be the first port of call: how to print a vector to a text file. Note that it’s a vector3f type.

Okay: in the Boid class, I’ve added 3 extra methods: getBoidX, getBoidY and getBoidZ (look at lines 286), which all return the specific variable of interest, of the x, y, z positions. Now, in the FlockBehavior class there is a method called processStimulation (line 72-ish). This method now calls each of the methods I’ve added, and prints them to screen. The next issue, needless to say, is: how to print this to a text file?

Right — no idea, in short! Look at what you’ve done on line 78 -> 93, and go from there.

March 7, 2007

Wednesday: notes … from a book! …

Filed under: Notes — JDE @ 7:20 pm

Today notes from Dealing with Complexity, An introduction to the theory and application of systems science, by Robert L Flood and Ewart R Carson, Plenum Press, 1988:

  1. p14: Sitatuions often form level in hierachical structures. Reduction [-ist -- JE] of the situation (downwards) increases the level of resolution of analysis.
    1. Holisitc : looking at the systems as a whole
    2. Reductionist : converting the system into many simplet forms
  2. p20 – 21:
    1. G Klir (1985, Complexity: some general obsesrvations. Systems Research, 2 (2), p 131 – 140)) stated “it is not operationally meaningful to view complexity as an intrinsic property of objects”
    2. G Klir (1985, Complexity: some general obsesrvations. Systems Research, 2 (2), p 131 – 140) notes commonsense Webster’s Third Internation Dictionary definitions are as follows:
      1. Having many varied interrelated parts, patterns or elements and consequently hard to understand fully
      2. Being marked by an involvementof many parts, aspects, details, notions, and necessitating earnest study or examination to understand or cope with
  3. p21: We have laredy noted that systems are situations as perceived by people. Now in addition to this, the definitions suggest, we need to include the ideas of (1) the number of parts, (2) the number of relationships between the parts, and (3) notions/perceptions.
  4. Diagram that maybe if use, p21 and 25 — RL Flood, MS Leaning, DG Cramp and ER Carson, 1987, A mathematical model of the fluid-electrolyte, acid-base balance: Formulation and validation (Research memorandum MIM/RLF-MSL-DGC-ERC/6). London: City University:
    1. 1st level: Complexity
    2. 2nd level:
      1. Systems
      2. People
    3. 3rd level
      1. Branching off Systems from 2nd level:
        1. Number of parts
        2. Number of relations
      2. Branching off People from 2nd level
        1. Interests
        2. Capabilites
        3. Notions/perceptions
    4. 4th level : Branching off number of parts and number of relations from 3rd level
      1. nonlinearity
      2. broken symmetry
      3. nonholomic constraints
  5. p 25 : FE Yates (1978) (Complexity and the limits to knowledge. American Journal of Physiology, 4, R201 – R204) belives complexity arises when one or more of the following 5 attributes are found:
    1. significant interactions
    2. high number of parts, degrees of freedom or interactions
    3. nonlinearity
    4. brokwn symmetry
    5. nonholonomic constraints
  6. p25 : Nonlinear systems (the graph of at elast one relationship displays some curved featurE) are notoriously more difficult comprehend than linear systems, that is, they are more complex. Consequently they are more difficult to control.
  7. p26 : Asymmetry (here) refers to situations that display broken symmetry.
  8. p27 : Nonholonomic constraint relates to laws (nomic) of wholes (holos).
    1. Constraints of laws of wholes, in systems terms, implies integrity of, and communication and control in, a system.
    2. The obverse of this, nonholonomic constraints, implies that parts of the system are temporarily outside central control, and can if fact go off and “do their own thing” (author’s interpretation)
    3. Complexity may therefore arise when there is some sort of localised transient anarchy is a system
    4. Anarchy itself suggest disorder and lack of government; however, our argument is not one of entropy but as follows: In systems terms, anarchy can cause such strains on a system, including positive feedback, that a system may go through a transition.
      1. in many cases anarchic behaviour is the catalyst of system transition, not from one state to another (within a predeterming state space; a one-to-one mapping of the state variables), rather, from one nature to another.
      2. That is, some essentail qualities are replaced by another set of essential qualities.
      3. The label of such a situation, however, may well remain the same
  9. Misc quotes from p28:
    1. N Pippenger (1978, June, Complexity Theory, Scientific American, p114 – 125) : diversity of phenomena that can arise through the interactionof simple components
    2. HA  Simon, (1965 The architecture of complexity. Genergal Systems Yearbok, 10, p 63 – 64) (but other’s before and after have said this) : “the whole is more than the sum of the parts”

Older Posts »

Blog at WordPress.com.