Hello, I'm Peter, and I'm very much a newbie.
New in the sense of being a novice at everything to do with programming,
rather than just new to Python, so please be very explicit in your replies
(should you deem me worth of such attention). I've long had a passing
interest in programming from a macro-conceptual level, but only very
recently have I tried to learn the details of how to impliment my ideas in
code. Since I'm so inexperienced and learning soley from on-line
documentation in my sparse spare time, I'm finding the learning curve rather
steep, and would appreciate it if you didn't assume that I 'know' anything
(especially with formating issues).
What instigated my uptake of programming was a recently sparked, and rapidly
growing interest in emergent processes, and particularly of computer
applications for them. I've not covered more than 20 hours of good study on
the subject (accounting for liberal procrastination), but I like to jump in
the deep end with things, and the logic of emergence really 'clicks' with my
brain. I have, however covered biological evolution in considerably more
depth, so I'm already quite familiar with the concepts involved.
What I've been trying to do with Python is to set up something resembling
John Von Neumann's conception of an imperfectly self-replicating program:
(3.2.1 Self-Reproduction
Nearly all of the practical implementations of articial worlds to be
described are related
in some way to the seminal work of John von Neumann. In the late 1940s and
early
1950s, he devoted considerable time to the question of how complicated
machines could
evolve from simple machines.9 Specically, he wished to develop a formal
description of
a system that could support self-reproducing machines which were robust in
the sense
that they could withstand some types of mutation and pass these mutations on
to their
ospring. Such machines could therefore participate in a process of
evolution.
Inspired by Alan Turing's earlier work on universal computing machines
[Turing 36],
von Neumann devised an architecture which could full these requirements.
The ma-
chine he envisaged was composed of three subcomponents [von Neumann 66]:
1. A general constructive machine, A, which could read a description (X) of
an-
other machine, X, and build a copy of X from this description:
A + (X) ; X (3.1)
(where + indicates a single machine composed of the components to the left
and
right suitably arranged, and ; indicates a process of construction.)
2. A general copying machine, B, which could copy the instruction tape:
B + (X) ; (X) (3.2)
9 Von Neumann had diculties in dening precisely what the term
`complicated' meant. He said \I
am not thinking about how involved the object is, but how involved its
purposive operations are.
In this sense, an object is of the highest degree of complexity if it can do
very dicult and involved
things." [von Neumann 66].
3.2. PREVIOUS WORK 47
3. A control machine, C, which, when combined with A and B, would rst
activate
B, then A, then link X to (X) and cut them loose from (A + B + C):
A + B + C + (X) ; X + (X) (3.3)
Now, if we choose X to be (A + B + C), then the end result is:
A + B + C + (A + B + C) ; A + B + C + (A + B + C) (3.4)
This complete machine plus tape, [A + B + C + (A + B + C)], is therefore
self-
reproducing. From the point of view of the evolvability of this
architecture, the crucial
feature is that we can add the description of an arbitrary additional
automaton D to
the input tape. This gives us:
A + B + C + (A + B + C + D) ; A + B + C +D + (A + B + C + D) (3.5)
Furthermore, notice that if the input tape (A + B + C +D) is mutated in
such a
way that the description of automaton D is changed, but that of A, B and C
are
unaected|that is, the mutated tape is (A + B + C +D0)|then the result of
the
construction will be:
A + B + C+ D + (A + B + C + D) mutation
; A + B + C + D0 + (A + B + C+ D0)
(3.6)
The reproductive capability of the architecture is therefore robust to some
mutations
(specically, those mutations which only aect the description of D), so the
machines
are able to evolve. Von Neumann pointed out that it was the action of the
general copy-
ing automaton, B, which gave his architecture the capacity for evolving
machines of
increased complexity, because B is able to copy the description of any
machine, no mat-
ter how complicated [von Neumann 66] (p.121). This ability is clearly
demonstrated in
Equation 3.5 above.
From Artificial Evolution to Artificial Life
Timothy John Taylor
Ph.D
University of Edinburgh
1999)
-The formatting on the equations is a bit messed up, but I hope you get the
idea.
Although the concept is quite straight forward, and I have my own ideas
about what specific features I'd like to include, I'm usure as to how to
implement it at the level of coding. Basically, I wish to create:
1. An entirely human-designed evolutionary engine.
2. A file that it '1' will acess, modify, test against a goal to retrive a
score, then save with the modifications intact and ready for the next run or
loop-cycle.
3. A buffer that will store a population of these files.
4. A death engine that will remove low scoring files (probably as a part of
'1')
These concepts aren't new, and are already well publicised. Variants of
them are used for determining coefficient values for engeneering, medical
etc research, but I wish to create a program that's more open ended than a
number-finder. The Neumann model is incomplete, since it not only fails to
specify a method for mutation beyond the vague decription given, but also
fails to account for the vanishingly small chance that completely random
mutation of a program would produce any intelligible results relative to the
processor's capacity for run cycles (overlooked, perhaps, because of an
over-riding focus on making the evolutionary engine robust to mutation). To
solve this, I propose an 'incubator' approach, where the engine would, as
part of its evolutionary toolkit, and particularly at the beginnng of the
process before the code becomes complex enough to allow the likelyhood of
non-fatal mutations, scavange code from external sources.
Regardless of any issues of copyright etc, this has the advantage of basing
the now-less random mutations on code that is known to be operable, rather
than the infinite monkies approach of random alphanumeric generation. To
incorporate this and other revisions and refinements that I've just spotted,
the program structure would look like so:
An entirely human-designed evolutionary engine, which:
1. Allows the user to set a goal.
2. Takes random sections of code from a library.
3. Places them in a text file.
4. Applies a 'scatter shot' of random alphanumeric changes (with either a
random or a user specified % of alpahnumerals changed)
5. Runs the file.
6. Scores the file on how many valid lines it has, if it fufilled the goal,
how long it took, etc.
7. Saves the score to the file (in the title?).
8. Repeats for a user specified number of times.
9. Selects the best programs, deletes the rest
10. Returns to '3' and repeats until stopped.
At the moment, I'm not even sure if python can create, chop and change
files, so that the effects of a program being run can persist after it's
closed down. The library modules are still largely incomprehensible to me,
both in their function and their implementation. I'm a very long way from
understanding how to apply the randomised aspects of the file changes, or
much else for that matter, and I can already see a bunch of things that
would need a lot of tweaking, even if the structure is sound (this is the
first proper program I've planned, which I'm sure means that the structure
is almost certaintly gibberish).
Other things that would be handy:
A bit to make sensible sections of code less vunerable to mutation, and
concentrate changes in 'junk' areas.
Something to decrease or prevent the addition of scavanged code when the
proportion of scavanged code to random alphanumeric changes and working
code, or vice versa (with working code forming the fulcrum of the dynamic).
A 'skills' counter/protector, that would allow files to retain redundant
code if their goal was changed, rather than necessarily losing it to the
pressure of clock cycles and the equivalent of genetic drift. (For this,
the 'bastion' module looks like it might be useful, though I'm not terribly
sure about how it works, or 'exactly' what it does)
An random goal changer, to provide an impetus for constant evolution without
the need for user input. (There's only so good you can be at any one thing)
An option to give the files an internal copy of the evolution engine, which
could then be modified by itself as it alters the entire file. (This may
prove difficult, as although this would allow the files to develop more
efficient strategies for the process of evolution itself, it would make them
more vunerable to fatal mutations. A possible solution would be to have a
'nuclear membrane' - a guard to prevent mutations that are particularly
likely to be fatal eg. mutations that alter significant chunks of the
engine. It would also be possible to have multiple engines in each cell,
which could self-assess and compare scores, replacing engines that
underperform through damage or 'under-evolution' (radiation resistant
bacteria use a similar technique)
==================
All of this seems like a rather tall order, especially as I'm still
struggling with some of the things from the beginners guide. Although I
should probably buy a book and work my way through lots of examples of
increasing complexity, I like to tackle things head-on and learn as I go.
Even just writing this message has helped me to clarify to myself what it is
I want to do.
If anybody has even bothered to read this far, I'd ask you please to give
some thought to these ideas (of myself and others), and perhaps to give me
some pointers in the right direction. Thankyou. 34 2144
[snip long and involved post]
What you have posted is currently generally known as a "Genetic
Algorithm". Searching for that term on Google should net you many links.
In terms of applicability, genetic algorithms are decent at
approximating solutions to a class of problems known as NP. You can
search through various resources for more information on NP.
Now, I say approximate, because if you look at the *space of possible
solutions*, genetic algorithms will tend to find local optimums. That
is, the space is huge, and genetic algorithms will find you a set of
decent solutions. These solutions are rarely, if ever, the true
optimal, but can, with the right crossover and mutation functions, be
pretty damn good.
In terms of using genetic algorithms to write programs, I haven't read
any papers in the last few years with any positive results in that
specific field. It is possible (in fact, quite likely) that I am
missing some sort of paper on the topic, but I wouldn't hold my breath.
So yeah, search for genetic algorithms and NP for their description, and
you'll probably find something you like.
Additionally, you may want to read Stephen Wolfram's "A New Kind of
Science". It is available on the internet for free.
- Josiah
(Hmm, this might appear as a double posting, but I don't think my last one
made it through.)
Thanks, but.
("One approach to discussing and comparing AI
problem solving strategies is to categorize them using the
terms ''strong'' and ''weak'' methods. Generally, a weak
method is one which has the property of wide applicability
but, because it makes few assumptions about the problem
domain, can suffer from combinatorially explosive
solution costs when scaling up to larger problems. State
space search algorithms and random search are familiar
examples of weak methods."
Using Genetic Algorithms to Solve NP-Complete Problems
Kenneth A. De Jong
George Mason University KD*****@GMUVAX2.GMU.EDU <mailto:KD*****@GMUVAX2.GMU.EDU>
William M. Spears
Navy Center for Applied Research in AI
Navy Center for Applied Research in AI SP****@AIC.NRL.NAVY.MIL <mailto:SP****@AIC.NRL.NAVY.MIL>
<http://hive.cs.uwyo.edu/~wspears/papers/icga89.pdf>)
From this, and other reading on genetic algorithms, I've found that nearly
all of the applications being developed and used are far 'stronger' than
what I have in mind. Most critically, the great preponderance of uses
involve a program that simply modulates a set of given variables in search
for an answer, rather than modifying the source code itself. Understandably,
this is because, as stated above, such 'weak' methods are of limited use for
most problems (I wouldn't want to fly in a plane that had been designed by
one).
Since, at the moment, I'm more interested in a 'pet cyber slime' than a tool
for designing efficient circuit layouts, such 'strong' applications are of
limited use. Even the 'state space' and 'random search' examples above are
considerably 'stronger' than I would desire to use.
For me, the goal is not only to create a program that can find an optimal
solution to a problem, but which can also find better ways of learning -
something disallowed by a fixed-algorithm engine.
Your pointer did lead me to consider a couple of aditional factors in my
design - the incoporation of a 'breeding' mechanism to allow files in a
population to share information, and a formalised chromosome stucture, to
increase the probability that mutations will produce sensible effect, and to
facilitate breeding:
(The process of species changing over time to become better at survival
within the environment is called evolution. One advance that it produced was
a new method of reproduction. Cells began to carry some of their genes in
rings called plasmids. During meetings between individual they could
exchange bundles, passing the environmental knowledge embedded within the
plasmid from individual to individual. Successful plasmids spread amongst
the population but unsuccessful plasmids encumbered their carrier who would
die sooner and have less chance to spread the bad genes. Greater benefits
came when certain genes came together that worked better in combination than
in isolation. The likelihood of random mutation equipping one cell with both
genes is low but with the crossover of genes between individuals these
traits can arise separately and, once they become common in the population,
join together within one individual.
Genetic Algorithms
Nature's Genetics
Matthew Caryl
<http://www.permutationcity.co.uk/projects/mutants/geneticalgorithms.html>)
There's a lot of other interesting stuff on this site, but it'll take a
while to examine it all, and it'll be quite a while more before I have the
time to start on Stephen Wolfram's "A New Kind of Science". One question
though - can I, indeed, create, modify, run and save files using just a
python script?
Peter MacKenzie <pe*******@btinternet.com> wrote in message
news:c4**********@hercules.btinternet.com... Hello, I'm Peter, and I'm very much a newbie.
New in the sense of being a novice at everything to do with programming, rather than just new to Python, so please be very explicit in your replies (should you deem me worth of such attention). I've long had a passing interest in programming from a macro-conceptual level, but only very recently have I tried to learn the details of how to impliment my ideas in code. Since I'm so inexperienced and learning soley from on-line documentation in my sparse spare time, I'm finding the learning curve
rather steep, and would appreciate it if you didn't assume that I 'know' anything (especially with formating issues).
What instigated my uptake of programming was a recently sparked, and
rapidly growing interest in emergent processes, and particularly of computer applications for them. I've not covered more than 20 hours of good study
on the subject (accounting for liberal procrastination), but I like to jump
in the deep end with things, and the logic of emergence really 'clicks' with
my brain. I have, however covered biological evolution in considerably more depth, so I'm already quite familiar with the concepts involved.
What I've been trying to do with Python is to set up something resembling John Von Neumann's conception of an imperfectly self-replicating program:
(3.2.1 Self-Reproduction Nearly all of the practical implementations of arti cial worlds to be described are related in some way to the seminal work of John von Neumann. In the late 1940s and early 1950s, he devoted considerable time to the question of how complicated machines could evolve from simple machines.9 Speci cally, he wished to develop a formal description of a system that could support self-reproducing machines which were robust in the sense that they could withstand some types of mutation and pass these mutations
on to their o spring. Such machines could therefore participate in a process of evolution. Inspired by Alan Turing's earlier work on universal computing machines [Turing 36], von Neumann devised an architecture which could ful l these requirements. The ma- chine he envisaged was composed of three subcomponents [von Neumann 66]: 1. A general constructive machine, A, which could read a description (X)
of an- other machine, X, and build a copy of X from this description: A + (X) ; X (3.1) (where + indicates a single machine composed of the components to the left and right suitably arranged, and ; indicates a process of construction.) 2. A general copying machine, B, which could copy the instruction tape: B + (X) ; (X) (3.2) 9 Von Neumann had diculties in de ning precisely what the term `complicated' meant. He said \I am not thinking about how involved the object is, but how involved its purposive operations are. In this sense, an object is of the highest degree of complexity if it can
do very dicult and involved things." [von Neumann 66]. 3.2. PREVIOUS WORK 47 3. A control machine, C, which, when combined with A and B, would rst activate B, then A, then link X to (X) and cut them loose from (A + B + C): A + B + C + (X) ; X + (X) (3.3) Now, if we choose X to be (A + B + C), then the end result is: A + B + C + (A + B + C) ; A + B + C + (A + B + C) (3.4) This complete machine plus tape, [A + B + C + (A + B + C)], is therefore self- reproducing. From the point of view of the evolvability of this architecture, the crucial feature is that we can add the description of an arbitrary additional automaton D to the input tape. This gives us: A + B + C + (A + B + C + D) ; A + B + C +D + (A + B + C + D) (3.5) Furthermore, notice that if the input tape (A + B + C +D) is mutated in such a way that the description of automaton D is changed, but that of A, B and C are una ected|that is, the mutated tape is (A + B + C +D0)|then the result of the construction will be: A + B + C+ D + (A + B + C + D) mutation ; A + B + C + D0 + (A + B + C+ D0) (3.6) The reproductive capability of the architecture is therefore robust to
some mutations (speci cally, those mutations which only a ect the description of D), so
the machines are able to evolve. Von Neumann pointed out that it was the action of the general copy- ing automaton, B, which gave his architecture the capacity for evolving machines of increased complexity, because B is able to copy the description of any machine, no mat- ter how complicated [von Neumann 66] (p.121). This ability is clearly demonstrated in Equation 3.5 above.
From Artificial Evolution to Artificial Life Timothy John Taylor Ph.D University of Edinburgh 1999)
-The formatting on the equations is a bit messed up, but I hope you get
the idea.
Although the concept is quite straight forward, and I have my own ideas about what specific features I'd like to include, I'm usure as to how to implement it at the level of coding. Basically, I wish to create: 1. An entirely human-designed evolutionary engine. 2. A file that it '1' will acess, modify, test against a goal to retrive
a score, then save with the modifications intact and ready for the next run
or loop-cycle. 3. A buffer that will store a population of these files. 4. A death engine that will remove low scoring files (probably as a part
of '1')
These concepts aren't new, and are already well publicised. Variants of them are used for determining coefficient values for engeneering, medical etc research, but I wish to create a program that's more open ended than a number-finder. The Neumann model is incomplete, since it not only fails
to specify a method for mutation beyond the vague decription given, but also fails to account for the vanishingly small chance that completely random mutation of a program would produce any intelligible results relative to
the processor's capacity for run cycles (overlooked, perhaps, because of an over-riding focus on making the evolutionary engine robust to mutation).
To solve this, I propose an 'incubator' approach, where the engine would, as part of its evolutionary toolkit, and particularly at the beginnng of the process before the code becomes complex enough to allow the likelyhood of non-fatal mutations, scavange code from external sources.
Regardless of any issues of copyright etc, this has the advantage of
basing the now-less random mutations on code that is known to be operable, rather than the infinite monkies approach of random alphanumeric generation. To incorporate this and other revisions and refinements that I've just
spotted, the program structure would look like so:
An entirely human-designed evolutionary engine, which: 1. Allows the user to set a goal. 2. Takes random sections of code from a library. 3. Places them in a text file. 4. Applies a 'scatter shot' of random alphanumeric changes (with either a random or a user specified % of alpahnumerals changed) 5. Runs the file. 6. Scores the file on how many valid lines it has, if it fufilled the
goal, how long it took, etc. 7. Saves the score to the file (in the title?). 8. Repeats for a user specified number of times. 9. Selects the best programs, deletes the rest 10. Returns to '3' and repeats until stopped.
At the moment, I'm not even sure if python can create, chop and change files, so that the effects of a program being run can persist after it's closed down. The library modules are still largely incomprehensible to
me, both in their function and their implementation. I'm a very long way from understanding how to apply the randomised aspects of the file changes, or much else for that matter, and I can already see a bunch of things that would need a lot of tweaking, even if the structure is sound (this is the first proper program I've planned, which I'm sure means that the structure is almost certaintly gibberish).
Other things that would be handy:
A bit to make sensible sections of code less vunerable to mutation, and concentrate changes in 'junk' areas.
Something to decrease or prevent the addition of scavanged code when the proportion of scavanged code to random alphanumeric changes and working code, or vice versa (with working code forming the fulcrum of the
dynamic). A 'skills' counter/protector, that would allow files to retain redundant code if their goal was changed, rather than necessarily losing it to the pressure of clock cycles and the equivalent of genetic drift. (For this, the 'bastion' module looks like it might be useful, though I'm not
terribly sure about how it works, or 'exactly' what it does)
An random goal changer, to provide an impetus for constant evolution
without the need for user input. (There's only so good you can be at any one
thing) An option to give the files an internal copy of the evolution engine,
which could then be modified by itself as it alters the entire file. (This may prove difficult, as although this would allow the files to develop more efficient strategies for the process of evolution itself, it would make
them more vunerable to fatal mutations. A possible solution would be to have a 'nuclear membrane' - a guard to prevent mutations that are particularly likely to be fatal eg. mutations that alter significant chunks of the engine. It would also be possible to have multiple engines in each cell, which could self-assess and compare scores, replacing engines that underperform through damage or 'under-evolution' (radiation resistant bacteria use a similar technique)
================== All of this seems like a rather tall order, especially as I'm still struggling with some of the things from the beginners guide. Although I should probably buy a book and work my way through lots of examples of increasing complexity, I like to tackle things head-on and learn as I go. Even just writing this message has helped me to clarify to myself what it
is I want to do.
If anybody has even bothered to read this far, I'd ask you please to give some thought to these ideas (of myself and others), and perhaps to give me some pointers in the right direction. Thankyou.
"Peter MacKenzie" <pe*******@btinternet.com> writes: (Hmm, this might appear as a double posting, but I don't think my last one made it through.)
Thanks, but.
("One approach to discussing and comparing AI problem solving strategies is to categorize them using the terms ''strong'' and ''weak'' methods. Generally, a weak method is one which has the property of wide applicability but, because it makes few assumptions about the problem domain, can suffer from combinatorially explosive solution costs when scaling up to larger problems. State space search algorithms and random search are familiar examples of weak methods."
I think 'genetic programming' as opposed to GA may be more in your line. GP
manipulates code directly with the usual crossovers, mutation etc. It's
usually done in Lisp/Scheme since just about any mutation is always, at least,
syntactically valid. The term 'evolutionary computing' is something of a
blanket term for these types of systems. I don't have any good references,
it's something I want to pursue myself at some point.
Eddie From this, and other reading on genetic algorithms, I've found that nearly all of the applications being developed and used are far 'stronger' than what I have in mind. Most critically, the great preponderance of uses involve a program that simply modulates a set of given variables in search for an answer, rather than modifying the source code itself. Understandably, this is because, as stated above, such 'weak' methods are of limited use for most problems (I wouldn't want to fly in a plane that had been designed by one).
Since, at the moment, I'm more interested in a 'pet cyber slime' than a tool for designing efficient circuit layouts, such 'strong' applications are of limited use. Even the 'state space' and 'random search' examples above are considerably 'stronger' than I would desire to use. For me, the goal is not only to create a program that can find an optimal solution to a problem, but which can also find better ways of learning - something disallowed by a fixed-algorithm engine.
Take this with a grain of salt, but generally, expecting computers to
learn is a high expectation. From neural networks (aka connectionist
networks), genetic algorithms, naive bayesian statistics, etc., the
desire in all of these cases is for a system that responds to a certain
environment, produces some reasonable solutions in this environment, and
works reasonably well in other environments.
The one limitation of all these approaches is that the algorithms and
methods for doing this have limited knowledge (usually a few hundred
bytes of state), no higher-order insight, etc. The algorithms, when
given proper input and design, can solve certain problems. You may get
lucky and your algorithm/data is applicable to another problem, but
those situations are the rare exception, rather than the rule.
These 'learning' methods do the best when applied to what you have shown
is called 'strong' problems. The 'weak' problems I've seen worked on,
generally had weak (read poor) results. The stronger your problem, the
better results you will likely have.
There's a lot of other interesting stuff on this site, but it'll take a while to examine it all, and it'll be quite a while more before I have the time to start on Stephen Wolfram's "A New Kind of Science". One question though - can I, indeed, create, modify, run and save files using just a python script?
Don't think of Python as a scripting language. It can be used that way,
but Python has better built-in data structures and language features
than the most used languages out there (C, C++ and Java).
Can you create a file? Certainly, open a file for writing that didn't
previously exist...
file_for_writing = open('filename', 'wb')
Can you modify a file? Certainly, open a file for reading and updating
that exists...
file_for_updating_in_place = open('filename', 'r+b')
Want to run a file? (be careful though, executing the contents of a
file can be dangerous)...
fil = open('filename', 'rb')
contents = fil.read()
fil.close()
exec(contents)
Want to save a file?
fil = open('filename', 'wb')
fil.write("some string of what you want to write")
fil.close()
- Josiah
Sorry for the long response time. I've been busy, and my brain has been
clogged up with a cold and hayfever.
Although I'm sure your instructions on creating files etc are perfectly
valid, I lack the basic grammatical knowledge to make use of them (I really
am very new to programing). I'll have to wait for my skills to catch up
with my ideas before I can move on, but that must wait until July, as I have
impending exams that demand much of my focus.
In addition to exams, I also must start a dissertation in July for my
geography hon B.Sc. Although I should ideally have found a subject two
months ago, I've so far lacked any truly appealing project ideas (much to
the consternation of my advisor). Since reading 'Emergence', by Steven
Johnson, and conducting prelimenary research on the matter, I've settled on
the dissertation title: "Emergence theory as an approach to city design".
To this goal, I'd like to use computer modeling to simulate ways in which
the spatial distribution of indicator phenomena in cities (land price/use,
crime, demographic composition etc) is affected by bottom-up, local area
rules. Given that I have only a basic foothold on the language, does
anybody foresee difficulties for me learning enough to impliment simple and
experimentally flexible sim-city style simulations (minus fancy graphics and
llamas) in no more than 2 months (to allow for time to conduct actual
experiments + field observations etc)? I would be able to engender aid from
various staff, and the university library should carry titles on the
subject. Failing that, I could do it the old fashioned way and buy a how-to
book, but I'd like some opinions on the difficulty of the goal from people
who've already trancended the non-programmer/programmer barrier.
> rules. Given that I have only a basic foothold on the language, does anybody foresee difficulties for me learning enough to impliment simple and experimentally flexible sim-city style simulations (minus fancy graphics and llamas) in no more than 2 months (to allow for time to conduct actual experiments + field observations etc)? I would be able to engender aid from various staff, and the university library should carry titles on the subject. Failing that, I could do it the old fashioned way and buy a how-to book, but I'd like some opinions on the difficulty of the goal from people who've already trancended the non-programmer/programmer barrier.
Two months is a pretty tight schedule. If you're on your toes, I would
bet you could learn enough of the langauge to support your ideas in 2
months. Actually programming the thing in 2 months; I wouldn't be able
to make that kind of judgement about your abilities.
I wish you luck.
- Josiah
I'll take that to mean that my chances are slim. Although this probability
is mediated my lack of a social life, I've conceived of a contingency
wherein a standard spreadsheet application could be used to facilitate at
least some limited degree of modelling. Given your recommendation, I'll
ensure the feasibility of this option before I commit to the primary
methodology, thereby ensuring that a disappointing rate of progress doesn't
prove fatal for my dissertation.
Fortunately, I've found an online textbook at http://www.ibiblio.org/obp/thinkCSpy/index.htm, which appears better suited
to my needs than the standard python documentation, and may alleviate some
of the conceptual and syntactical difficulties I've been experiencing.
I expect I may be back here for additional aid in the near-future.
And how near that future was! I've been going over the open/read/edit file
stuff again, trying to make it work, but I'm still having no success. I'm
not sure if I'm missing something fundamental (like a frontal lobe), or if
there's some less worrying problem afoot, but this is what I've been trying.
I've put it through many iterations, dropping and adding brackets and
full-stops, playing around with the structure and grammar etc, but nothing
seems to work.
import sys
file = 'myfile.txt'
open(file,'r+b')
file.write("some string of what you want to write")
file.close()
When I run this, it returns the message:
Traceback (most recent call last):
File "C:\Python23\openfile.py", line 5, in ?
file.write()("some string of what you want to write")
AttributeError: 'str' object has no attribute 'write'
It must be something really simple that I've overlooked or failed to grasp,
but I've exhausted my willingness to continue experimenting and attempting
to reverse engineer code from the library modules. Please help. My brain
hurts.
Peter MacKenzie wrote: import sys
This part is useless for the four lines that follow, but
of course you'll need it if you ever want to access anything
that really is in the sys module...
file = 'myfile.txt'
Here the name "file" is bound to a string.
open(file,'r+b')
Here you call a builtin and pass it two strings. Functions
can "never" modify what the arguments are bound to, so this
cannot modify the name "file" to something else. Clearly not
what you intended. Note that open() really *returns* the newly
created file object, so you should be assigning the result as:
file = open(filename, 'r+b')
Of course, now you need a "filename" name, which is what the
first line should be doing:
filename = 'myfile.txt' # instead of "file = ..."
file.write("some string of what you want to write") file.close()
These two will now work.
Why don't you run through the Python tutorial first, since these
are pretty basic questions, some of which will be resolved if you
go the defined routes first.
There are also other good Python/newbie resources linked to from
the web site if you go there and poke around.
-Peter
On Fri, 2 Apr 2004, Peter MacKenzie wrote: import sys
You don't need the sys module for file I/O.
file = 'myfile.txt' open(file,'r+b') file.write("some string of what you want to write") file.close()
"file" is a str object containing the string "myfile.txt". What you need
to do is catch the return value (a file object) of the open() function and
use that for writing:
file = "myfile.txt"
fh = open(file, "r+") ## Do you need "b" (binary) for a text file?
fh.write("something")
fh.close()
Cheers,
/Mickel
--
Mickel Grönroos, application specialist, linguistics, Research support,CSC
PL 405 (Tekniikantie 15 a D), 02101 Espoo, Finland, phone +358-9-4572237
CSC is the Finnish IT center for science, www.csc.fi
On Fri, 2 Apr 2004 10:16:19 +0000 (UTC), "Peter MacKenzie"
<pe*******@btinternet.com> wrote: I'll take that to mean that my chances are slim. Although this probability is mediated my lack of a social life, I've conceived of a contingency wherein a standard spreadsheet application could be used to facilitate at least some limited degree of modelling. Given your recommendation, I'll ensure the feasibility of this option before I commit to the primary methodology, thereby ensuring that a disappointing rate of progress doesn't prove fatal for my dissertation.
Fortunately, I've found an online textbook at http://www.ibiblio.org/obp/thinkCSpy/index.htm, which appears better suited to my needs than the standard python documentation, and may alleviate some of the conceptual and syntactical difficulties I've been experiencing.
I expect I may be back here for additional aid in the near-future.
The spreadsheet approach may be a suitable alternative, indeed.
In the past, I've taught some friends with an accounting background
a little about programming, using spreadsheet formulae as examples.
Actually, spreadsheets might even have an advantage in your case,
because the calculations are performed simultaneously, for all intents
and purposes. You don't need to control the "flow". This is a common
characteristic of "simulation languages", also. In them, you set up
your equations, relationships, dependencies, etc, provide initial
conditions, and let them run. There is very little of the linear
sequencing of steps that occurs in most popular languages (python,
C(etc), lisp/scheme, pascal).
To simulate "generations", you will probably need to write a macro
that copies one generation to the next (column, or separate sheet).
This is ironic, given that the Von Neumann paper that started your
interest in the subject is about copying a machine/program.
Best of luck,
--dang
Peter Hansen + Mickel Grönroos, (unsure of a more suitable intro protocol
for this environment + situation)
Oh the joy! It makes life worth living when things click into place and
make sense. My style of learning seems ill suited to the material available
on the subject, so although I had indeed read all that I could find on
making files, it was presented in a manner that I couldn't quite comprehend.
To elaborate, I process linguistic information in a holistic, intuitive
manner; a quality that requires for me to develop a 'feel' for the language
in question, rather than a literal understanding of the rules.
Because of this, I need full-yet-simple working examples to deconstruct and
process. Most of the examples I've come across have been fragmented and
incomplete, which leaves me grasping at loose ends and the countless
possibilities therein. It's as though somebody had handed me at birth a
dictionary and a set of grammatical rules, with the expectation that I would
be able to piece it all together and learn to communicate.
Conversely, my search for the working examples I craved only turned up
applications of the process that were too bound up in more complex matters
to be decipherable, the analogy this time being that of getting handed a
copy of 'Moby Dick' from which to start my education.
Being presented with an isolated, sterilised 'specimen' has helped me to
form a better understanding of the language, being of the right mix of
information bandwidth vs. complexity to allow me to capture the 'flavour' in
the code.
If there are any teachers reading this, I hope it might engender you to
consider the varying needs of students in your classes. By being an outlier
on the mental demographic, I've long suffered from problems arising from my
minority neurology. The cause, however, has generally been from
communicative frictions, rather than from the relative merits and demerits
of that mental architecture.
Thank you both for your help (spreadsheets in the next message).
Peter MacKenzie wrote: Oh the joy! It makes life worth living when things click into place and make sense.
I know the feeling. For me too, the best way to learn a new language is
to wallow in working examples. I still remember the thrill of hacking
my way through Tom Swan's "Mastering Turbo Pascal" in the late
eighties, where he presented every wrinkle of the language, and every
single library function with both a working example program and a lucid
discussion. I've never learnt any other computer language so
thoroughly.
regards,
--
Leif Biberg Kristensen http://solumslekt.org/
Validare necesse est
Peter MacKenzie wrote: Peter Hansen + Mickel Grönroos, (unsure of a more suitable intro protocol for this environment + situation)
Oh the joy! It makes life worth living when things click into place and make sense. My style of learning seems ill suited to the material available on the subject, so although I had indeed read all that I could find on making files, it was presented in a manner that I couldn't quite comprehend. To elaborate, I process linguistic information in a holistic, intuitive manner; a quality that requires for me to develop a 'feel' for the language in question, rather than a literal understanding of the rules.
Because of this, I need full-yet-simple working examples to deconstruct and process. Most of the examples I've come across have been fragmented and incomplete, which leaves me grasping at loose ends and the countless possibilities therein. It's as though somebody had handed me at birth a dictionary and a set of grammatical rules, with the expectation that I would be able to piece it all together and learn to communicate.
Sounds like you should check out www.diveintopython.org, which as I
recall has quite full examples. If you haven't read it already do so.
The only other thing I can suggest is spend less time defending your
way of learning things :-) and more time just *doing* it. Write code,
and when it doesn't work at first, experiment. Python should be
learned with the interactive interpreter prompt right in front of
you, typing and watching and learning...
Anyway, keep at it. Python is certainly one of the easiest if not
the easiest modern language to learn (IMHO) so you should find yourself
making relatively good progress, whatever your difficulties.
-Peter
Spreadsheets do seem to be an attractive option, but the benefits are not
without their detractors:
+Easy to work with
+Require no/limited skill acquisition
+Flexible
-Cells can only hold single items of data (which can be worked around by
using arrays of cells to hold multiple attributes for each location)
-Require no/limited skill acquisition (being familiar and honest with my own
psychological composition, I know that the only way I'm likely to develop a
fair degree of programming competence is if there's a driving pressure to do
so. It's something I'd like to learn, and this gives me the excuse/leverage
to do so.)
Unknowns: Time series graphical output would be necessary, even if it's
very primitive. Do you know if the spreadsheet could be set up in such a
way that cells would change colour depending on their values, or if the
graph making facilities would be able to create reasonable representations
of said values so that a series of graphs would be capable of showing up
phenomena with fluidic (wavelike, turbulent, etc) characteristics?
I'm afraid the temptation to take the hard route my prove too great
(psychological paradoxes: I always feel good about feeling so terrible about
these things after I've passed the point of no return in the undertaking,
and the enormity of the task at hand sinks in - it's a whole adrenalin
thing), but I'd still like to make a comprehensive assessment of my options
before I commit to anything.
> fh = open(file, "r+") ## Do you need "b" (binary) for a text file?
Of course not, but keeping that binary flag allows you to get all the
information from a file when you are on windows. Depending on the
contents, this is not always the case.
Inserting the binary flag in *nix doesn't hurt anything.
- Josiah
Leif B. Kristensen wrote: I know the feeling. For me too, the best way to learn a new language is to wallow in working examples.
Same here. That's how I learned Perl. I picked up the basics from
Learning Perl, but no clear sense of how to use it for my purposes.
Then I picked up Programming Perl and got thoroughly intimidated. Then
I found the Perl Cookbook and fairly quickly learned what I needed to
know by scarfing the example code and modifying it for my purposes.
Now I find I'm following almost exactly the same trajectory with Python.
I have Learning Python and Programming Python, and just recently got a
copy of the Python Cookbook. Yeah, this is gonna work out fine.
On Fri, 2 Apr 2004 16:58:32 +0000 (UTC), "Peter MacKenzie"
<pe*******@btinternet.com> wrote: Spreadsheets do seem to be an attractive option, but the benefits are not without their detractors:
....-Require no/limited skill acquisition (being familiar and honest with my own psychological composition, I know that the only way I'm likely to develop a fair degree of programming competence is if there's a driving pressure to do so. It's something I'd like to learn, and this gives me the excuse/leverage to do so.)
Sorry I can't help you with that one--it's for you to decide.
Unknowns: Time series graphical output would be necessary, even if it's very primitive. Do you know if the spreadsheet could be set up in such a way that cells would change colour depending on their values, or if the graph making facilities would be able to create reasonable representations of said values so that a series of graphs would be capable of showing up phenomena with fluidic (wavelike, turbulent, etc) characteristics?
I don't know what spreadsheet you're using, but I know Microsoft Excel
support conditional coloring.
I'm afraid the temptation to take the hard route my prove too great (psychological paradoxes: I always feel good about feeling so terrible about these things after I've passed the point of no return in the undertaking, and the enormity of the task at hand sinks in - it's a whole adrenalin thing), but I'd still like to make a comprehensive assessment of my options before I commit to anything.
It's a complex project. I'm pretty sure a spreadsheet is capable of
performing the calculations, but it may not be the best to provide
the graphical result you're looking for. On the other hand, maybe it
could generate the numbers for the graphics, and then you could have
a second program that reads the numbers to perform only the
graphics operations.
I agree with Josiah--two months is tight. I suggest if you're more
comfortable with a spreadsheet, start with a minimal "program" in
the spreadsheet. Realize that writing a python program will
require you to make many of the same design / algorithm decisions
as the spreadsheet.
--dang
I think then that I might stick with spreadsheets as far a possible. Do you
know of any simulation programs that might be more suited? Also, how would
you extract data from a spreadsheet for use in another program? I'm not
familiar with means of linking spreadsheets to external applications, though
I don't doubt that it can be done.
In article <c4**********@news.service.uci.edu>,
Josiah Carlson <jc******@uci.edu> wrote: rules. Given that I have only a basic foothold on the language, does anybody foresee difficulties for me learning enough to impliment simple and experimentally flexible sim-city style simulations (minus fancy graphics and llamas) in no more than 2 months (to allow for time to conduct actual experiments + field observations etc)? I would be able to engender aid from various staff, and the university library should carry titles on the subject. Failing that, I could do it the old fashioned way and buy a how-to book, but I'd like some opinions on the difficulty of the goal from people who've already trancended the non-programmer/programmer barrier.
Two months is a pretty tight schedule. If you're on your toes, I would bet you could learn enough of the langauge to support your ideas in 2 months. Actually programming the thing in 2 months; I wouldn't be able to make that kind of judgement about your abilities.
In article <c4**********@titan.btinternet.com>,
Peter MacKenzie <pe*******@btinternet.com> wrote:
In article <c4**********@hercules.btinternet.com>,
Peter MacKenzie <pe*******@btinternet.com> wrote: Spreadsheets do seem to be an attractive option, but the benefits are not without their detractors:
+Easy to work with +Require no/limited skill acquisition +Flexible
-Cells can only hold single items of data (which can be worked around by using arrays of cells to hold multiple attributes for each location) -Require no/limited skill acquisition (being familiar and honest with my own psychological composition, I know that the only way I'm likely to develop a fair degree of programming competence is if there's a driving pressure to do so. It's something I'd like to learn, and this gives me the excuse/leverage to do so.)
Unknowns: Time series graphical output would be necessary, even if it's very primitive. Do you know if the spreadsheet could be set up in such a way that cells would change colour depending on their values, or if the graph making facilities would be able to create reasonable representations of said values so that a series of graphs would be capable of showing up phenomena with fluidic (wavelike, turbulent, etc) characteristics?
I'm afraid the temptation to take the hard route my prove too great (psychological paradoxes: I always feel good about feeling so terrible about these things after I've passed the point of no return in the undertaking, and the enormity of the task at hand sinks in - it's a whole adrenalin thing), but I'd still like to make a comprehensive assessment of my options before I commit to anything.
Spreadsheets can do anything. Python can do anything.
To first approximation, at least. They both have developed
enough to have far more capabilities than you'll exhaust in
a couple of months.
The key questions are: which better suit your psychology?
Which will get in the way less? Which support "libraries"
of related material in your "domain" (geography)?
You're not experienced enough with software yet to judge
the first of these questions well. Whatever first impres-
sions Python or Excel make on you are likely to dwindle to
insignicance after a few more weeks of software exploration.
One of the dimensions your comparison of the two approaches
doesn't cover is robustness of expression and abstraction.
You aren't in a position to appreciate this yet, but Python
beats spreadsheets all to pieces in these regards. Crudely,
you can hand a Python solution to someone else, two years
from now, and he'll understand what you've done, and how to
modify or validate or ... it. I argue strongly that that is
*not* true for spreadsheet solutions. I therefore regard
spreadsheet approaches, except in specialized circumstances,
as anti-scientific, because they don't promote the free
exchange of ideas.
There's a rich literature on simulation done with computers,
some of it specifically by those coming from geography. It
would be no particular problem to dissipate the entire two
months just reading up on what you plan to do. You need to
figure out a very circumscribed goal, and ask experts on what
you should do to achieve it.
Reading through *Thinking ... with Python* certainly can be
part of that path.
--
Cameron Laird <cl****@phaseit.net>
Business: http://www.Phaseit.net
In article <c4**********@hercules.btinternet.com>,
Peter MacKenzie <pe*******@btinternet.com> wrote: I think then that I might stick with spreadsheets as far a possible. Do you know of any simulation programs that might be more suited? Also, how would you extract data from a spreadsheet for use in another program? I'm not familiar with means of linking spreadsheets to external applications, though I don't doubt that it can be done.
Software people *constantly* talk about "means of linking ... to
external applications"; it's one of our obsessions, for reasons
best left to another time.
Here's a way you can practice thinking about it: a spreadsheet
can write its "answers" to a file--just a simple document, the
sort you might write as a human, yourself. Another program can
read that file. That establishes communication between the
spreadsheet and the other program. Mission accomplished.
Spreadsheets typically have *dozens* of distinct ways of talking
to "outsiders", although that's often apparent only to software
specialists.
--
Cameron Laird <cl****@phaseit.net>
Business: http://www.Phaseit.net
In article <c4**********@hercules.btinternet.com>,
Peter MacKenzie <pe*******@btinternet.com> wrote: Hello, I'm Peter, and I'm very much a newbie.
In article <c4**********@titan.btinternet.com>,
Peter MacKenzie <pe*******@btinternet.com> wrote: (Hmm, this might appear as a double posting, but I don't think my last one made it through.)
Thanks, but.
("One approach to discussing and comparing AI problem solving strategies is to categorize them using the terms ''strong'' and ''weak'' methods. Generally, a weak
Josiah Carlson <jc******@uci.edu> wrote in message news:<c4**********@news.service.uci.edu>... Want to run a file? (be careful though, executing the contents of a file can be dangerous)... fil = open('filename', 'rb') contents = fil.read() fil.close() exec(contents)
or just use execfile('filename') or even import filename.
Michele Simionato
"Peter MacKenzie" <pe*******@btinternet.com> wrote in message news:<c4**********@sparta.btinternet.com>... In addition to exams, I also must start a dissertation in July for my geography hon B.Sc. Although I should ideally have found a subject two months ago, I've so far lacked any truly appealing project ideas (much to the consternation of my advisor). Since reading 'Emergence', by Steven Johnson, and conducting prelimenary research on the matter, I've settled on the dissertation title: "Emergence theory as an approach to city design".
To this goal, I'd like to use computer modeling to simulate ways in which the spatial distribution of indicator phenomena in cities (land price/use, crime, demographic composition etc) is affected by bottom-up, local area rules. Given that I have only a basic foothold on the language, does anybody foresee difficulties for me learning enough to impliment simple and experimentally flexible sim-city style simulations (minus fancy graphics and llamas) in no more than 2 months (to allow for time to conduct actual experiments + field observations etc)? I would be able to engender aid from various staff, and the university library should carry titles on the subject. Failing that, I could do it the old fashioned way and buy a how-to book, but I'd like some opinions on the difficulty of the goal from people who've already trancended the non-programmer/programmer barrier.
I would suggest you to forget about this project and to spend those two
months in learning the basis of Python. IMO learning a programming language
will do to your mind a far better good than learning a spreadsheet.
Having said so, it is ok if you keep this project in the back of your mind
while you learn programming, but do not expect you can finish it in a couple
of months starting from scratch, without guidance and not working on it full
time. OTOH, a couple of months is enough to get the basics of programming
(which is not the same as becoming a programmer). I would estimate the time
to get a minimal understanding of modern programming in one year. Still,
notice that I estimate the time to write your first useful program in Python
in five minutes, so you will get back something from your effort immediately.
This is the nice thing about programming. The bad thing are bugs, that you
will get well before the first five minutes ;)
Michele Simionato
Von Thunen? I had to look that one up, but I realised upon finding it that
I'd been taught it way back in first year geography in high school. It's
not something they refer to anymore, except as an absolute first step to
understanding settlement structure and distribution. Looking over it again,
it's easy to see why. The criteria required for it to work are almost
impossible in the real world, so the models that are taught after it are
generally refinements and novel applications of the basic Von Thunen
concepts.
To take a couple of examples, the bid/rent model of land use is a modern
version that incorporates lines of communication (roads, rails, etc) when
considering land uses, which convert the concentric structure of the Von
Thunen model into something more reminiscent of a spider web.
Models that address sociological phenomenon bring in another layer of
refinement. Particularly notable are those models that focus on 'quartered'
cities, with self-contained micro-cities serving distinct groups. These
structures were commonplace during the colonial era, when trade cities were
often a multi-nucleated patchwork of white, indigenous and 'miscellaneous'
societies.
It's common, when addressing any location, to apply a Von Thunen framework
to the layout of the area and use any discrepancies with the idealised
theory as a focus of the study. Generally though, it's something so
ingrained in the geographer's conscious that it never really gets much
thought.
Cameron Laird <cl****@lairds.com> wrote in message
news:10*************@corp.supernews.com... In article <c4**********@news.service.uci.edu>, Josiah Carlson <jc******@uci.edu> wrote: rules. Given that I have only a basic foothold on the language, does anybody foresee difficulties for me learning enough to impliment simple
and experimentally flexible sim-city style simulations (minus fancy
graphics and llamas) in no more than 2 months (to allow for time to conduct actual experiments + field observations etc)? I would be able to engender aid
from various staff, and the university library should carry titles on the subject. Failing that, I could do it the old fashioned way and buy a
how-to book, but I'd like some opinions on the difficulty of the goal from
people who've already trancended the non-programmer/programmer barrier.
Two months is a pretty tight schedule. If you're on your toes, I would bet you could learn enough of the langauge to support your ideas in 2 months. Actually programming the thing in 2 months; I wouldn't be able to make that kind of judgement about your abilities.
. . . Bluntly, I'd bet against it. There's a daunting amount of new material you'll need to learn. My advice: we can help you refine your project so that the computing part is less overwhelming.
'You read von Thunen, by the way? --
Cameron Laird <cl****@phaseit.net> Business: http://www.Phaseit.net
>You might like "The Outsider's Guide to Artificial Intelligence" <URL: http://robotwisdom.com/ai/index.html >.
Yes. It is interesting. I've been playing with the idea of graphical
representations for programming 'phrases' for a while, and the reference to
LISP brought it to mind. Although LISP doesn't look that much better than
Python code, are there any programs out there that let you program, um,
programs, using various shapes, colours etc? Just thinking about it brings
up all manner of difficulties that would be encountered if you tried to
create such a thing, but it would be nice if there was some immediately
obvious graphical connection between pieces of code (so beginners like me
didn't keep trying to put the square code through the round code ;-) ).
Just a thought of the 'in the shower' variety.
I also liked the idea of the metagame project
(http://satirist.org/learn-game/projects/metagame.html), though I don't see
myself taking on a challenge of that magnitude in the reasonably foreseeable
future.
Cameron Laird <cl****@lairds.com> wrote in message
news:10*************@corp.supernews.com... In article <c4**********@titan.btinternet.com>, Peter MacKenzie <pe*******@btinternet.com> wrote:(Hmm, this might appear as a double posting, but I don't think my last
onemade it through.)
Thanks, but.
("One approach to discussing and comparing AI problem solving strategies is to categorize them using the terms ''strong'' and ''weak'' methods. Generally, a weak . [much more] . . You might like "The Outsider's Guide to Artificial Intelligence" <URL: http://robotwisdom.com/ai/index.html >. --
Cameron Laird <cl****@phaseit.net> Business: http://www.Phaseit.net
So much to take in, so little time. I'm torn between the creative urge to
go forth and embark on this project, and the more pressing need to
study-study-study for exams, so please bear with me if I appear a little
distracted.
My 'psychology' is one that responds better to open possibilities than
closed boundaries. Compared to the expansive potential of python, I'd
likely become disenchanted with the restrictive structure of spreadsheets.
Although I could launch straight into the simpler spreadsheet stuff, getting
it to do really interesting stuff may prove tricky in the long run, and I'd
be constantly itching to try something more 'fun'.
A little investment in learning to program would leave me a happier person,
in the short and the long term. Since it's a skill I'd like to acquire
anyway, I'm inclined to lean that way regardless of the relative merits of
spreadsheets vs. python. It's likely that the added difficulty of
implementing it in an unfamiliar format would be taken into consideration in
the grading of the dissertation (as is standard practice where the project
is faced with obstacles), but do you think that python would make for a
'better' dissertation?
As for whittling away a couple of months on background reading, I doubt I'd
have the patience. I like to launch straight into things, learning as I go
and doing stuff my own way. Generally, I only refer to other peoples' work
when I'm really stuck, or when I don't know enough about the subject to even
hazard a guess at where to start. Doubtless I'll get really stuck at many
points in my simulation attempts, as I've been really stuck just trying to
get the simplest of code to work, but I don't see myself pouring over the
arcane tomes for longer than is strictly necessary. Not that I intend to be
sloppy about my reading - just concise.
Also, the 2-month schedule should perhaps be clarified. The actual deadline
is the beginning of December, but I'd like to keep fairly pessimistic about
the time I'll have, given course considerations, the limited amount of
effort I can spare before the first of June (end of exams) as well as the
tendency of field work and data mining to eat time like candy. Still, if
push comes to shove, I could makes thing fit, one way or another.
Cameron Laird <cl****@lairds.com> wrote in message
news:10*************@corp.supernews.com... In article <c4**********@hercules.btinternet.com>, Peter MacKenzie <pe*******@btinternet.com> wrote:Spreadsheets do seem to be an attractive option, but the benefits are not without their detractors:
+Easy to work with +Require no/limited skill acquisition +Flexible
-Cells can only hold single items of data (which can be worked around by using arrays of cells to hold multiple attributes for each location) -Require no/limited skill acquisition (being familiar and honest with my
ownpsychological composition, I know that the only way I'm likely to develop
afair degree of programming competence is if there's a driving pressure to
doso. It's something I'd like to learn, and this gives me the
excuse/leverageto do so.)
Unknowns: Time series graphical output would be necessary, even if it's very primitive. Do you know if the spreadsheet could be set up in such a way that cells would change colour depending on their values, or if the graph making facilities would be able to create reasonable
representationsof said values so that a series of graphs would be capable of showing up phenomena with fluidic (wavelike, turbulent, etc) characteristics?
I'm afraid the temptation to take the hard route my prove too great (psychological paradoxes: I always feel good about feeling so terrible
aboutthese things after I've passed the point of no return in the undertaking, and the enormity of the task at hand sinks in - it's a whole adrenalin thing), but I'd still like to make a comprehensive assessment of my
optionsbefore I commit to anything.
Spreadsheets can do anything. Python can do anything.
To first approximation, at least. They both have developed enough to have far more capabilities than you'll exhaust in a couple of months.
The key questions are: which better suit your psychology? Which will get in the way less? Which support "libraries" of related material in your "domain" (geography)?
You're not experienced enough with software yet to judge the first of these questions well. Whatever first impres- sions Python or Excel make on you are likely to dwindle to insignicance after a few more weeks of software exploration.
One of the dimensions your comparison of the two approaches doesn't cover is robustness of expression and abstraction. You aren't in a position to appreciate this yet, but Python beats spreadsheets all to pieces in these regards. Crudely, you can hand a Python solution to someone else, two years from now, and he'll understand what you've done, and how to modify or validate or ... it. I argue strongly that that is *not* true for spreadsheet solutions. I therefore regard spreadsheet approaches, except in specialized circumstances, as anti-scientific, because they don't promote the free exchange of ideas.
There's a rich literature on simulation done with computers, some of it specifically by those coming from geography. It would be no particular problem to dissipate the entire two months just reading up on what you plan to do. You need to figure out a very circumscribed goal, and ask experts on what you should do to achieve it.
Reading through *Thinking ... with Python* certainly can be part of that path. --
Cameron Laird <cl****@phaseit.net> Business: http://www.Phaseit.net
Peter MacKenzie wrote: You might like "The Outsider's Guide to Artificial Intelligence" <URL: http://robotwisdom.com/ai/index.html >.
Yes. It is interesting. I've been playing with the idea of graphical representations for programming 'phrases' for a while, and the reference to LISP brought it to mind. Although LISP doesn't look that much better than Python code, are there any programs out there that let you program, um, programs, using various shapes, colours etc? Just thinking about it brings up all manner of difficulties that would be encountered if you tried to create such a thing, but it would be nice if there was some immediately obvious graphical connection between pieces of code [...]
Using the "G" graphical language of LabVIEW, all code ends up
_literally_ looking like spaghetti... would that help? ;-)
-Peter
In article <c4**********@hercules.btinternet.com>,
Peter MacKenzie <pe*******@btinternet.com> wrote:
In article <dq********************@powergate.ca>,
Peter Hansen <pe***@engcorp.com> wrote:
Looking at it, I don't think it's for me. I'll keep it in mind for future
tasks, but this dissertation would be better served by text coding and a
raster display. The flow chart code and vector graphics output of LabVIEW
might be useful if I was doing sociological work, as that uses a lot of flow
chart stuff to model the inter-linkages between people, but I'm not really a
people person. Another minute, another thing I've learned. It's not quite
as exciting as following the 'thinking' tutorial though. fruit = "bannana" bakedfood = " nut bread" fruit + bakedfood
'bannana nut bread'
message = "What's up, doc?"
fruit *len(fruit)
'bannanabannanabannanabannanabannanabannanabannana ' fruit *len(message)
'bannanabannanabannanabannanabannanabannanabannana bannanabannanabannanabanna
nabannanabannanabannanabannana'
It took me a bit to figure out this one:
fruit * pow(len(message),1)
'bannanabannanabannanabannanabannanabannanabannana bannanabannanabannanabanna
nabannanabannanabannanabannana'
(I won't take it to >>>fruit * pow(len(message),2)) There's such a thing a
too much fibre. :-)
Cameron Laird <cl****@lairds.com> wrote in message
news:10*************@corp.supernews.com... In article <dq********************@powergate.ca>, Peter Hansen <pe***@engcorp.com> wrote: . . . LISP brought it to mind. Although LISP doesn't look that much better
than Python code, are there any programs out there that let you program, um, programs, using various shapes, colours etc? Just thinking about it
brings up all manner of difficulties that would be encountered if you tried to create such a thing, but it would be nice if there was some immediately obvious graphical connection between pieces of code [...]
Using the "G" graphical language of LabVIEW, all code ends up _literally_ looking like spaghetti... would that help? ;-)
-Peter
LabVIEW's the first example that came to my mind, although perhaps Prograph or JavaBeans (!) could be argued as more commercially successful.
I've worked on VPLs a couple of cycles in my career already, in process-control contexts. My enthusiasm is tepid--but then I've exceedingly text-oriented. --
Cameron Laird <cl****@phaseit.net> Business: http://www.Phaseit.net This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: A Waterfall That Barks |
last post by:
http://www.c-sharpcorner.com//Code/2003/March/SwarmSim.asp
I just found this port of the swarm groups famous 'complexity from
simple interacting agents' type software.
Very easy to load and...
|
by: Scott Robert Ladd |
last post by:
I've just posted my analysis of GNU C and C++ optimizations, using a
genetic algorithm to discover the most effective optimization flags for
different algorithms.
ACOVEA (Analysis of Compiler...
|
by: louis |
last post by:
For those in the DFW area, there's an IT open house at Perot Systems.
(In my group, we're looking to hire one senior sql server DBA. Go to
the perot systems web site to apply).
...
|
by: avinash |
last post by:
EIGHTEENTH INTERNATIONAL CONFERENCE ON SYSTEMS ENGINEERING (ICSEng05)
LAS VEGAS, USA,
AUGUST 16-18, 2005
(http://www.icseng.info)
This series of International Conferences is jointly organized...
|
by: Emine Ekin |
last post by:
/*Apologize for multiple posts*/
FIRST CALL FOR PAPERS
ADVIS 2006
Fourth Biennial International Conference on
Advances in Information Systems
18-20 October, 2006
Izmir, Turkey
|
by: Bill Law |
last post by:
Great Company on the Maryland Eastern Shore needs a DB2 Systems
Programmer and DBA (DB2)
to join their IT team.
The selected candidate MUST have a BS degree and both DB2 DBA And DB2
Systems...
|
by: user |
last post by:
Hi all,
At the outset, I regret having to post this slightly OT post here.
However, I strongly feel that people in this group would be the best to
advise me on my predicament.
I am working as...
|
by: Matt |
last post by:
How do we define systems programs? when we say systems programming,
does it necessary mean that the programs we write need to interact
with hardware directly? For example, OS, compiler, kernel,...
|
by: Ty Oft |
last post by:
Hello Bytes!
Maybe my question seems a bit silly (as one could simply answer it "Well, what are you more passionate about?" or stuff like that - please don't answer like this), but I am in a bit...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |