Category: Uncategorized
Trucks (and the fluid dynamics thereof (with ideas for internet startups))
This was all written in 2008, so the prices will have gone up. The truck rental user experience is still garbage, though.
I’m renting a truck, and since I’m not in a hurry, I decided to check every service that showed up on the front page of a Google search. Truck rental seems like the sort of business where there would not be a lot to distinguish competitors aside from price and service. From what I’ve seen of U-Haul’s customer service, that is not where they distinguish themselves, so truck rental companies must be competing on price.
Ryder wants $45 for a day of use of a truck, and that includes 1000 (yes, a thousand) miles.
U-haul wants ~$100 for one day of use, with 59 miles for a one-way rental. A round-trip rental is $29.95, plus $0.99/mile, which is something of a concern when the round trip is 100 miles or so.
Budget wants $112.85 for one day and 85 miles one-way. For a round-trip, the cost is the same as U-haul, so a 100 mile round trip ends up costing around $130.
Penske wants $180 for a one-way trip, and offers unlimited mileage. The round trip cost is $70, which is a lot more reasonable but still doesn’t beat Ryder.
I’ll have to make a round-trip anyway, because I’ll probably have to drive to the truck pick-up location, and then leave my car there. If the trip were any shorter, the prices for U-haul and Budget would be better,
but on this particular route, Ryder manages to beat all other rental companies by a pretty good margin. The heuristic seems to be that for any round trip under ten miles, go for U-haul or Budget, Ryder for trips
beyond that, and Penske if you are doing something like going across the country, which makes the “unlimited mileage” actually significant.
Ryder can offer the better deal for this distance because they don’t offer one-way rentals. Companies that do offer one-way rentals have the issue that trucks will accumulate at places people want to move to, and
run out at places that people don’t want to be. Every fall, college towns would have too many trucks and towns in the suburbs would run out.
The solution is to hire some people to drive the trucks to where they are needed. That’s a sure way to lose money, because those people have to be paid, the gas for those trips comes out of the company’s pocket,
and the drivers don’t pay for the rental. The only way to make money on this situation is to either restrict one-way rentals (Ryder), or charge more to cover the losses (everyone else).
Cutting out one-way rentals is not the most optimal solution for the company, though, just the simplest. Given a bit of information about where the trucks tend to flow over the course of a year, or where they
are and where they are needed, it should be possible to do things like offering one-way rentals only to the places trucks are needed. This gets paying customers to move the trucks and pay for the gas, but it requires a good deal of tracking and trend analysis to work well. It also could become an issue if something unexpected happens, like an unpopular place suddenly becoming wildly popular, and everyone moving there.
Another way to improve truck rental with computers would be to figure out the pricing algorithms used by each of the major truck rental companies, and then use that information to calculate which rental
company is best for a given route. If someone wanted to make a business out of doing this, they could get the rental companies to give them a cut of the referrals, and offer business intelligence on where people are moving and how they want to use the rental. Heck, if I found the idea of starting a business interesting, I could probably handle the software end of this. Fortunately for me, I don’t find it interesting,
because if I did, I’d start a business, and I wouldn’t like that because I’m not interested in starting a business.
Holonomic drives and tradeoffs
I noticed that I could get a used toy car that has Mecanum wheels for around $12. This is pretty neat, because the wheels themselves can be pretty spendy. The reason to use Mecanum wheels is that, with 4 of them, you can get rotation and translation in any direction by varying the speed of each wheel independently. It’s a properly holonomic drive, letting you do stuff you can’t do with tank style steering, like orbiting a point while facing it.
Of course, this is cheap crap from China, so I was also curious where the corners had been cut to make it cheap. I assumed I wasn’t getting four motors, four encoders, and a closed loop controller, but what I got is kind of interesting.
The car has two gearboxes, one one each side, and two motors. Each motor drives one wheel on each gearbox, on opposite corners. So one motor drives the left front and right rear wheels, and vice versa. Driving just one motor will make the car translate diagonally, driving both will make it translate forward, backwards, or sideways, depending on which direction they are driven.
Unfortunately, what this design gives up is turning. Any turning at all. Rotation around an axis is just Not The Done Thing. I think the only way to change heading is to hit something.
The wheels are pretty nice, though. There seems to be an informal standard of 5.75mm across the flats hexagonal shafts for toy robot motors, and these follow it, so I can get a set of motors and encoders to use the wheels.
Not Even Wrong.
There is a conceptual division of statements of fact that places them on a sort of spectrum from “right” to “wrong”. Right facts are those that square with what is observed in the world (e.g. “water is wet”) and wrong ideas are those that do not (e.g. “water is pink”). Inherent in this is the idea of falsifiablity: these statements assert facts, and the truth or falsity of these facts can be determined. Statements that are not even wrong are those that do not engage with the mechanisms of meaning, truth, and so forth, and so cannot be tested (e.g. “water is beautiful”). Some people may find a particular body of water beautiful or not, on a given day, but that says more about the people than the water, and is not something that can really be falsified.
Aeon published a fairly regrettable article, called “The Empty Brain“, which, despite the almost self-aware title, does not appear to be an autobiography. It’s main problem is that the author is not aware of the meaning of the words he uses, and so from possibly correct, or at least coherent premises, builds an Escher-esque house of failed conclusions.
No matter how hard they try, brain scientists and cognitive psychologists will never find a copy of Beethoven’s 5th Symphony in the brain – or copies of words, pictures, grammatical rules or any other kinds of environmental stimuli. The human brain isn’t really empty, of course. But it does not contain most of the things people think it does – not even simple things such as ‘memories’.
This is, of course, wrong. The brain is, in fact, the organ of the body in which memories are stored. This has been demonstrated, both in research on animals and in unfortunate cases where humans sustained trauma to the brain and lost memories, or memory-related functions, as a consequence. Anyone asserting otherwise would have to find an organ which stores memories, and is not the brain. This approach, of asserting that something is not the case, but failing to indicate what is, appears to be Epstein’s primary mode of argument.
He is somewhat correct, in that the brain does not contain copies of the listed items in a form that you can simply peer into the brain and read back out. The idea that they are not stored at all, however, begs the question of how we operate using something that Epstein asserts that we do not have, and worse, how we have the subjective experience of having something he asserts we don’t have.
Our shoddy thinking about the brain has deep historical roots, but the invention of computers in the 1940s got us especially confused. For more than half a century now, psychologists, linguists, neuroscientists and other experts on human behaviour have been asserting that the human brain works like a computer.
People have used a number of metaphors to explain the working of a number of systems. The brain/computer one is flawed, and in some places strained, but at a very high level has some explanatory value. The problems mostly arise when people mistake the map for the territory. In later paragraphs, Epstein does this on a level roughly on par with seeing a map of the United States, and then asserting that one could jump across the United States, since it’s only about a meter wide.
To see how vacuous this idea is, consider the brains of babies. Thanks to evolution, human neonates, like the newborns of all other mammalian species, enter the world prepared to interact with it effectively. A baby’s vision is blurry, but it pays special attention to faces, and is quickly able to identify its mother’s. It prefers the sound of voices to non-speech sounds, and can distinguish one basic speech sound from another. We are, without doubt, built to make social connections.
A healthy newborn is also equipped with more than a dozen reflexes – ready-made reactions to certain stimuli that are important for its survival. It turns its head in the direction of something that brushes its cheek and then sucks whatever enters its mouth. It holds its breath when submerged in water. It grasps things placed in its hands so strongly it can nearly support its own weight. Perhaps most important, newborns come equipped with powerful learning mechanisms that allow them to change rapidly so they can interact increasingly effectively with their world, even if that world is unlike the one their distant ancestors faced.
So far so good, these statements about the behavior of newborn babies are largely correct. They have a vast number of built-in capabilities, which are part of their structure, as described by their DNA and built in utero according to that plan.
Senses, reflexes and learning mechanisms – this is what we start with, and it is quite a lot, when you think about it. If we lacked any of these capabilities at birth, we would probably have trouble surviving.
But here is what we are not born with: information, data, rules, software, knowledge, lexicons, representations, algorithms, programs, models, memories, images, processors, subroutines, encoders, decoders, symbols, or buffers – design elements that allow digital computers to behave somewhat intelligently. Not only are we not born with such things, we also don’t develop them – ever.
And here is where we run up against the limitations of Epstein’s knowledge and lexicon. These words mean things, and many of them mean things that are exactly what we do develop. Information, for example, is, at a very basic and informal level, the ability to discriminate between things. It has an inverse, called entropy. In the game of 20 Questions, the guessing player starts off with no information except that the answering player is thinking of a thing. Each question they ask adds one bit of information, and causes a corresponding reduction in their entropy. To assert that humans never “develop” information is to assert that humans never acquire the ability to tell anything from anything else, and so experience the world as a sort of colossal monolith of all things.
An algorithm is a procedure for solving a problem or doing a calculation. If you ever learned to do long division, change a car tire, or get dressed, you have an algorithm, and if you really sat down and thought about it, you could probably write the procedure down. If you never learned to do any of that stuff, you’re naked and walking everywhere, so you’re really not my problem.
Mixed in with the things that we clearly do develop are some that we clearly don’t. To say that the brain has “software”, for example, strains the metaphor to the breaking point. Yes, one could make a distinction between the activity of the brain and the physical matter of the brain, but since the matter does the activity and the activity changes the matter, the distinction isn’t terribly useful except when considering the possibility of executing the activity in simulation, on different matter.
We don’t store words or the rules that tell us how to manipulate them. We don’t create representations of visual stimuli, store them in a short-term memory buffer, and then transfer the representation into a long-term memory device. We don’t retrieve information or images or words from memory registers. Computers do all of these things, but organisms do not.
Computers, quite literally, process information – numbers, letters, words, formulas, images. The information first has to be encoded into a format computers can use, which means patterns of ones and zeroes (‘bits’) organised into small chunks (‘bytes’). On my computer, each byte contains 8 bits, and a certain pattern of those bits stands for the letter d, another for the letter o, and another for the letter g. Side by side, those three bytes form the word dog. One single image – say, the photograph of my cat Henry on my desktop – is represented by a very specific pattern of a million of these bytes (‘one megabyte’), surrounded by some special characters that tell the computer to expect an image, not a word.
This is where Epstein starts to lose the plot with regard to what information is. Information is not just numbers, letters, words and so forth. It is the ability to discriminate. One bit, the fundamental unit of information, has two possible values, typically represented as 1 and 0. It allows a single discrimination, this/that, here/there, etc. Unfortunately for this line of argument, that’s pretty much all that a bit is. The fact that computers happen to handle the bits as chunks of 8 to a byte, or that certain patterns stand for certain things are what’s called “implementation details”.
Paul Revere’s friend in the Old North Church on the eve of the revolution sent a two-bit message to Paul using lanterns. The famous line is “One if by land, two if by sea”, with the number of lanterns indicating the approach direction of the British forces. This could be done by one bit: 1 lantern for land, 0 lanterns for sea. However, there was a second bit needed to distinguish a potential failure case: 11 (binary for 2) if by sea, 01 (binary for one) if by land, 00 (binary for 0) if they catch you before you put the lantern up. Note that these cases have nothing to do with computers, because Paul’s cell phone was unreliable or something.
The fact that we don’t store our visual memories in our heads as 1024×768 pixel 24-bit per pixel JPG-compressed image files doesn’t mean we don’t have representations, just that they’re not the same as the ones in computers. There is still latent information, but the implementation details are different.
Computers, quite literally, move these patterns from place to place in different physical storage areas etched into electronic components. Sometimes they also copy the patterns, and sometimes they transform them in various ways – say, when we are correcting errors in a manuscript or when we are touching up a photograph. The rules computers follow for moving, copying and operating on these arrays of data are also stored inside the computer. Together, a set of rules is called a ‘program’ or an ‘algorithm’. A group of algorithms that work together to help us do something (like buy stocks or find a date online) is called an ‘application’ – what most people now call an ‘app’.
Yes, the way a computer does these things is called an algorithm. This is a matter of convention, though. The way I make a cake is also an algorithm, and while accurate, it would sound stilted for me to say it that way, so I don’t. That doesn’t make it less correct, though.
Forgive me for this introduction to computing, but I need to be clear: computers really do operate on symbolic representations of the world. They really store and retrieve. They really process. They really have physical memories. They really are guided in everything they do, without exception, by algorithms.
Humans, on the other hand, do not – never did, never will. Given this reality, why do so many scientists talk about our mental life as if we were computers?
Again with the asserting that things are not, without proposing what they are. If human memories are not physical, then what are they? If we don’t do things by following procedures, then how do we do them?
In his book In Our Own Image (2015), the artificial intelligence expert George Zarkadakis describes six different metaphors people have employed over the past 2,000 years to try to explain human intelligence.
In the earliest one, eventually preserved in the Bible, humans were formed from clay or dirt, which an intelligent god then infused with its spirit. That spirit ‘explained’ our intelligence – grammatically, at least.
The invention of hydraulic engineering in the 3rd century BCE led to the popularity of a hydraulic model of human intelligence, the idea that the flow of different fluids in the body – the ‘humours’ – accounted for both our physical and mental functioning. The hydraulic metaphor persisted for more than 1,600 years, handicapping medical practice all the while.
By the 1500s, automata powered by springs and gears had been devised, eventually inspiring leading thinkers such as René Descartes to assert that humans are complex machines. In the 1600s, the British philosopher Thomas Hobbes suggested that thinking arose from small mechanical motions in the brain. By the 1700s, discoveries about electricity and chemistry led to new theories of human intelligence – again, largely metaphorical in nature. In the mid-1800s, inspired by recent advances in communications, the German physicist Hermann von Helmholtz compared the brain to a telegraph.
Each metaphor reflected the most advanced thinking of the era that spawned it. Predictably, just a few years after the dawn of computer technology in the 1940s, the brain was said to operate like a computer, with the role of physical hardware played by the brain itself and our thoughts serving as software. The landmark event that launched what is now broadly called ‘cognitive science’ was the publication of Language and Communication (1951) by the psychologist George Miller. Miller proposed that the mental world could be studied rigorously using concepts from information theory, computation and linguistics.
The key word of this is “metaphor”. The metaphor that the brain is like a computer indicates that at some level it shares some properties, not that the brain and a computer are identical. If I say my girlfriend’s cheeks are like roses, I mean that they are pink and soft, not that she literally has flowers for a face.
Information theory is the basis of all the talk about entropy and bits earlier, it is the study of systems capable of discrimination, as humans appear to be, between the things in their environments, so it doesn’t seem like too much of a stretch to attempt to apply it to the question of how we do that discriminating.
This kind of thinking was taken to its ultimate expression in the short book The Computer and the Brain (1958), in which the mathematician John von Neumann stated flatly that the function of the human nervous system is ‘prima facie digital’. Although he acknowledged that little was actually known about the role the brain played in human reasoning and memory, he drew parallel after parallel between the components of the computing machines of the day and the components of the human brain.
Propelled by subsequent advances in both computer technology and brain research, an ambitious multidisciplinary effort to understand human intelligence gradually developed, firmly rooted in the idea that humans are, like computers, information processors. This effort now involves thousands of researchers, consumes billions of dollars in funding, and has generated a vast literature consisting of both technical and mainstream articles and books. Ray Kurzweil’s book How to Create a Mind: The Secret of Human Thought Revealed (2013), exemplifies this perspective, speculating about the ‘algorithms’ of the brain, how the brain ‘processes data’, and even how it superficially resembles integrated circuits in its structure.
Von Neumann’s assertion that the activity of the nervous system is digital is based on the observation of the electrical activity of nerves, which appear to have two states: resting and firing, and change the rate at which they fire, rather than e.g. the amplitude with which they fire. Note again, the appearance of the word two, that is to say, one bit of information, firing/resting. Whether sub-threshold activity, which does not tip the neuron into firing, has a place in cognition is an open research question. The point is that Von Neumann did not mean that everyone was running around with a ENIAC full of vacuum tubes in their head, but that the activity of neurons appeared to be divided into two phases, rather than a continuum. Digital, not analog.
Having not read the Kurtzweil book, I cannot speak to its content or the accuracy of the review. However, anyone with any knowledge of the structure, at the IC level in computers or the neuronal level in brains, would regard any similarity as purely superficial: they’re both really complicated.
The idea that humans are information processors is, with a proper understanding of what information is, fairly trivial to assert. Anything that reacts to its environment is an information processor at some level, as it has received information (that is, it has determined that some condition holds or not) and then engaged in some process using that information.
The information processing (IP) metaphor of human intelligence now dominates human thinking, both on the street and in the sciences. There is virtually no form of discourse about intelligent human behaviour that proceeds without employing this metaphor, just as no form of discourse about intelligent human behaviour could proceed in certain eras and cultures without reference to a spirit or deity. The validity of the IP metaphor in today’s world is generally assumed without question.
But the IP metaphor is, after all, just another metaphor – a story we tell to make sense of something we don’t actually understand. And like all the metaphors that preceded it, it will certainly be cast aside at some point – either replaced by another metaphor or, in the end, replaced by actual knowledge.
At the beginning of this article, if you can really call it that, the author asserted that humans don’t develop knowledge. Now he says we’ll replace our metaphors with knowledge. As to the validity of the current metaphor, it has its good points and its bad ones, but the main problem is in over-applying it, or insisting that it holds true in cases where it doesn’t. The idea that we can follow a sequence of steps to perform a task (that is, use an algorithm) seems to have been extended (at least by Epstein) to mean that we run a bootleg copy of Windows in our heads. The idea that there is a representation stored in our brains has been overextended (again, by Epstein) to mean that we store the image file “mom.png” in a folder someplace. Unfortunately for the line of argument against these over-extensions, no one actually believes that. That’s the whole point of a metaphor. It’s not literally true, it just says there exist similarities.
Just over a year ago, on a visit to one of the world’s most prestigious research institutes, I challenged researchers there to account for intelligent human behaviour without reference to any aspect of the IP metaphor. They couldn’t do it, and when I politely raised the issue in subsequent email communications, they still had nothing to offer months later. They saw the problem. They didn’t dismiss the challenge as trivial. But they couldn’t offer an alternative. In other words, the IP metaphor is ‘sticky’. It encumbers our thinking with language and ideas that are so powerful we have trouble thinking around them.
Now this is a legitimate problem, and an interesting challenge. All maps are wrong, but some maps are useful, and the IP map certainly has some utility. However, having it as the only map you can use to think about something limits the thinking you can do.
The faulty logic of the IP metaphor is easy enough to state. It is based on a faulty syllogism – one with two reasonable premises and a faulty conclusion. Reasonable premise #1: all computers are capable of behaving intelligently. Reasonable premise #2: all computers are information processors. Faulty conclusion: all entities that are capable of behaving intelligently are information processors.
Setting aside the formal language, the idea that humans must be information processors just because computers are information processors is just plain silly, and when, some day, the IP metaphor is finally abandoned, it will almost certainly be seen that way by historians, just as we now view the hydraulic and mechanical metaphors to be silly.
After such a promising preceding paragraph, this descent into silly-gisms is a disappointment. Premise #1 is nothing like reasonable. No one who works with computers for any length of time is capable of thinking something like that without at least a wry smile, and sometimes a chuckle. Computers are stupid. They are literally dumb as rocks: their main active components are made of silicon, the main constituent of quartz. However, computers are also fast. They are capable of manipulating the symbols they work on at blazing speeds, and so they can do things that humans find hard (multiplying large numbers, looking through a list of a million names to see if a specific one is on it) easily. They are not, however, intelligent.
The loss of the premise gets rid of the syllogism, but perhaps its conclusion, while logically unsound, still has some merit. The terms are, admittedly, ill defined. Just what is “behaving intelligently”?
The portia genus of jumping spider eats other spiders, and has a repertoire of behaviors it uses to approach and attack other spiders. These include different ways of tapping on the webs of other spiders, to disguise its approach or to mimic trapped insects. If one of these approaches fails, it will try others, and can learn which ones are effective against which kinds of spiders. Portia also has the ability to make long detours that take it out of sight of prey, in order to descend on its prey from behind. These seem like intelligent behaviors, if fairly minimal ones.
However, in order to do all these things, portia receives and operates on information. It uses its eyes to distinguish between different kinds of prey spiders (again, discrimination is the basis of information). It uses some form of mental map-building and direction sensing to make its detours. So even this very basic intelligent behavior relies on information being accessed and used.
As a thought experiment, then, what intelligent behavior would be possible without performing some process on some information? With no information, there is no distinguishing between things, so the universe is perceived as a single confusion of sense-data, with no distinguishing characteristics (as those would be information), or not perceived at all (as something/nothing is exactly one bit of information). No behavior can be selected, either. Selection of one behavior, as opposed to another, gives rise to a single bit of information. So yes, all behavior, at some point, is a product of information being processed. One could point out that a rock might roll down a hill, receiving no input and selecting no output, but that is hardly “behavior” in any sense that the word is normally used, and it’s certainly not intelligent.
If the IP metaphor is so silly, why is it so sticky? What is stopping us from brushing it aside, just as we might brush aside a branch that was blocking our path? Is there a way to understand human intelligence without leaning on a flimsy intellectual crutch? And what price have we paid for leaning so heavily on this particular crutch for so long? The IP metaphor, after all, has been guiding the writing and thinking of a large number of researchers in multiple fields for decades. At what cost?
Ok, now we’re getting somewhere interesting again. The bit with the syllogism could have been left out, and would have strengthened the argument. Unfortunately, this is the last we’ll hear, in this essay at least, about this potentially fruitful line of inquiry.
In a classroom exercise I have conducted many times over the years, I begin by recruiting a student to draw a detailed picture of a dollar bill – ‘as detailed as possible’, I say – on the blackboard in front of the room. When the student has finished, I cover the drawing with a sheet of paper, remove a dollar bill from my wallet, tape it to the board, and ask the student to repeat the task. When he or she is done, I remove the cover from the first drawing, and the class comments on the differences.
Because you might never have seen a demonstration like this, or because you might have trouble imagining the outcome, I have asked Jinny Hyun, one of the student interns at the institute where I conduct my research, to make the two drawings. Here is her drawing ‘from memory’ (notice the metaphor):
And here is the drawing she subsequently made with a dollar bill present:
Jinny was as surprised by the outcome as you probably are, but it is typical. As you can see, the drawing made in the absence of the dollar bill is horrible compared with the drawing made from an exemplar, even though Jinny has seen a dollar bill thousands of times.
What is the problem? Don’t we have a ‘representation’ of the dollar bill ‘stored’ in a ‘memory register’ in our brains? Can’t we just ‘retrieve’ it and use it to make our drawing?
This is the problem with the metaphor leading us into a variety of possible traps in how we think about things. The first is that since humans do have memories (despite Epstein’s assertions to the contrary) and computers have memories (RAM is “Random Access Memory” after all), they must be exactly the same objects. This is, when stated clearly, obviously wrong. Humans have existed far longer than computers, and that is a useful clue to the source of the confusion. The memory in computers was named that by analogy to the function of our memory: it is a place to store some form of representation. Computer memories are precise where ours our somewhat fuzzy, delicate where ours are surprisingly robust, and made of silicon metal and plastic where ours are made mostly out of wet fat. The analogy is at a functional level, not the details of implementation.
Obviously not, and a thousand years of neuroscience will never locate a representation of a dollar bill stored inside the human brain for the simple reason that it is not there to be found.
Wait, what? Then how did his student call up anything at all? The term “dollar bill” refers to something, and it’s something most Americans are familiar with. If there was nothing in Jinny’s brain that in some way represented a dollar bill, then when she was asked to draw one, she would have said something like “What is a ‘dollar bill’?” The term would not have referred to anything, and since it wasn’t likely to refer to a particular actual dollar bill (Jinny probably doesn’t keep her money between her ears), it would refer to some representation of one.
But for now, lets take Epstein at (pardon the pun) face value. There are no representations of anything in the brain.
A wealth of brain studies tells us, in fact, that multiple and sometimes large areas of the brain are often involved in even the most mundane memory tasks. When strong emotions are involved, millions of neurons can become more active. In a 2016 study of survivors of a plane crash by the University of Toronto neuropsychologist Brian Levine and others, recalling the crash increased neural activity in ‘the amygdala, medial temporal lobe, anterior and posterior midline, and visual cortex’ of the passengers.
This part is actually pretty accurate. Even more interestingly, the storage is somehow holographic, in the sense that it requires pretty widespread damage to remove memories, rather than having them highly localized, and so lost with minor damage.
The idea, advanced by several scientists, that specific memories are somehow stored in individual neurons is preposterous; if anything, that assertion just pushes the problem of memory to an even more challenging level: how and where, after all, is the memory stored in the cell?
I’m willing to take this as an axiom. It’s hard to propose a method for handling the storage, and it has weird implications. For example, infants are born with lots of neurons already in place, but haven’t experienced much, so what do their neurons store? White noise? The sound of one hand clapping?
I do, however, find it suspect that he was able to cite a lot of studies about multiple regions of the brain becoming active during memory tasks, but when it comes to this one-neuron-one-memory idea, suddenly it’s a murky “several scientists”. Which ones?
So what is occurring when Jinny draws the dollar bill in its absence? If Jinny had never seen a dollar bill before, her first drawing would probably have not resembled the second drawing at all. Having seen dollar bills before, she was changed in some way. Specifically, her brain was changed in a way that allowed her to visualise a dollar bill – that is, to re-experience seeing a dollar bill, at least to some extent.
Ok, so there is a change in her brain, which has at least some of the content of seeing a dollar bill, but is not a representation. This is either a distinction without a difference, or the author descending into near-incoherence. A representation is a description or portrayal, a set of signs that stand in for (that “represent”) something else. The changes to Jinny’s brain are not a dollar bill, clearly, but they stand in for it when she is asked to draw one. They’re just not very good or precise stand-ins, largely because they don’t need to be to permit Jinny to do things like recognize dollar bills when she is presented with them.
The difference between the two diagrams reminds us that visualising something (that is, seeing something in its absence) is far less accurate than seeing something in its presence. This is why we’re much better at recognising than recalling. When we re-member something (from the Latin re, ‘again’, and memorari, ‘be mindful of’), we have to try to relive an experience; but when we recognise something, we must merely be conscious of the fact that we have had this perceptual experience before.
Perhaps you will object to this demonstration. Jinny had seen dollar bills before, but she hadn’t made a deliberate effort to ‘memorise’ the details. Had she done so, you might argue, she could presumably have drawn the second image without the bill being present. Even in this case, though, no image of the dollar bill has in any sense been ‘stored’ in Jinny’s brain. She has simply become better prepared to draw it accurately, just as, through practice, a pianist becomes more skilled in playing a concerto without somehow inhaling a copy of the sheet music.
I will admit that there is not a literal copy of a dollar bill in Jinny’s brain, in the sense that if you cracked the poor woman’s skull open and rooted around, you wouldn’t find anything you could pay a bar tab with. No one has ever made any claim that you would, though, so the point of this exercise is somewhat unclear. Clearly she’s undergoing an alteration that is not the thing itself, but is something that stands in for the thing itself (i.e a representation). The fact that it’s not literally “dollar_bill.png” doesn’t mean the alteration didn’t happen.
From this simple exercise, we can begin to build the framework of a metaphor-free theory of intelligent human behaviour – one in which the brain isn’t completely empty, but is at least empty of the baggage of the IP metaphor.
As we navigate through the world, we are changed by a variety of experiences. Of special note are experiences of three types: (1) we observe what is happening around us (other people behaving, sounds of music, instructions directed at us, words on pages, images on screens); (2) we are exposed to the pairing of unimportant stimuli (such as sirens) with important stimuli (such as the appearance of police cars); (3) we are punished or rewarded for behaving in certain ways.
We become more effective in our lives if we change in ways that are consistent with these experiences – if we can now recite a poem or sing a song, if we are able to follow the instructions we are given, if we respond to the unimportant stimuli more like we do to the important stimuli, if we refrain from behaving in ways that were punished, if we behave more frequently in ways that were rewarded.
Misleading headlines notwithstanding, no one really has the slightest idea how the brain changes after we have learned to sing a song or recite a poem. But neither the song nor the poem has been ‘stored’ in it. The brain has simply changed in an orderly way that now allows us to sing the song or recite the poem under certain conditions. When called on to perform, neither the song nor the poem is in any sense ‘retrieved’ from anywhere in the brain, any more than my finger movements are ‘retrieved’ when I tap my finger on my desk. We simply sing or recite – no retrieval necessary.
Except that the change to the brain is the storing of the memorized thing in it. It’s also a lot of other things, like the kinesthetics of the performance, the emotional content of it and the intonations and expressions that would convey that performance to others, and so on. The representation is different from the original, and possibly both richer and less accurate, but that’s a far cry from the assertion that no representations exist. They just are not precise copies.
A few years ago, I asked the neuroscientist Eric Kandel of Columbia University – winner of a Nobel Prize for identifying some of the chemical changes that take place in the neuronal synapses of the Aplysia (a marine snail) after it learns something – how long he thought it would take us to understand how human memory works. He quickly replied: ‘A hundred years.’ I didn’t think to ask him whether he thought the IP metaphor was slowing down neuroscience, but some neuroscientists are indeed beginning to think the unthinkable – that the metaphor is not indispensable.
A few cognitive scientists – notably Anthony Chemero of the University of Cincinnati, the author of Radical Embodied Cognitive Science (2009) – now completely reject the view that the human brain works like a computer. The mainstream view is that we, like computers, make sense of the world by performing computations on mental representations of it, but Chemero and others describe another way of understanding intelligent behaviour – as a direct interaction between organisms and their world.
I have only limited experience with neuroscience, but having done some computational neuroscience, rather than just talked to a neuroscientist once years ago, I can safely say that almost no one thinks that humans perform calculations (in the narrow sense that computers perform calculations, at least) on mental representations of the world.
On the other hand, I have fuckton of experience with robotics, and I can tell you that that approach to AI is called GOFAI (Good Old Fashioned AI), and it tends to run into combinatorial explosion problems when your world has more than like 12 things in it. It is not, in general, an effective way of dealing with a dynamic and changing world, especially in the absence of perfect perception. However, in narrow applications, it is terrifyingly effective. The last person who could play a computer to a stalemate in checkers died in the 70s, and since then, they have become perfect at it, in the formal sense. You, a human, cannot beat a computer at checkers.
This is the root of what’s known as Moravec’s paradox. The things that we literally do without thinking about it, like running across uneven ground, are absurdly difficult for computers, while things that we find tortuously brain-bending, like thinking a handful of moves ahead in chess, are easy for computers. Our brains are evolved to be good at certain things, and to do them efficiently and well enough to not die. We don’t need to explain these activities, because everyone who didn’t have how to acquire those skills hardwired into them from birth was eaten. The things that our brains did not evolve to be good at, like maintaining baroque and precise structures of abstractions and assessing them very quickly, computers happen to be very good at.
My favourite example of the dramatic difference between the IP perspective and what some now call the ‘anti-representational’ view of human functioning involves two different ways of explaining how a baseball player manages to catch a fly ball – beautifully explicated by Michael McBeath, now at Arizona State University, and his colleagues in a 1995 paper in Science. The IP perspective requires the player to formulate an estimate of various initial conditions of the ball’s flight – the force of the impact, the angle of the trajectory, that kind of thing – then to create and analyse an internal model of the path along which the ball will likely move, then to use that model to guide and adjust motor movements continuously in time in order to intercept the ball.
That is all well and good if we functioned as computers do, but McBeath and his colleagues gave a simpler account: to catch the ball, the player simply needs to keep moving in a way that keeps the ball in a constant visual relationship with respect to home plate and the surrounding scenery (technically, in a ‘linear optical trajectory’). This might sound complicated, but it is actually incredibly simple, and completely free of computations, representations and algorithms.
Well, yes, no, and no. The baseball player doesn’t run the numbers, but the presence of external events is somehow represented in their brain, unless you’re willing to claim that the baseball in the air outside is literally the same thing as the one represented by the idea of “baseball” and the sense-information in the player’s head. And, unfortunately, “Keep moving in a way that keeps (your representation of) the ball in a constant visual (representation) relationship with respect to (your representation of) home plate and (your representation of) the surrounding scenery” is an algorithm, that is to say, a sequence of steps to achieve a goal.
Interestingly, a lot of the ways robots do things effectively are more or less implementations of the “keep these visual targets in this sort of relationship” algorithm, more than the “build a detailed model of the physics of the world and do math on it” algorithms, at least at some level of their implementation. After all, these are the more robust ways of dealing with the world, and that’s what we want the robots to do… and yet, the algorithms are being run on standard computers like you can buy in the shop.
Two determined psychology professors at Leeds Beckett University in the UK – Andrew Wilson and Sabrina Golonka – include the baseball example among many others that can be looked at simply and sensibly outside the IP framework. They have been blogging for years about what they call a ‘more coherent, naturalised approach to the scientific study of human behaviour… at odds with the dominant cognitive neuroscience approach’. This is far from a movement, however; the mainstream cognitive sciences continue to wallow uncritically in the IP metaphor, and some of the world’s most influential thinkers have made grand predictions about humanity’s future that depend on the validity of the metaphor.
One prediction – made by the futurist Kurzweil, the physicist Stephen Hawking and the neuroscientist Randal Koene, among others – is that, because human consciousness is supposedly like computer software, it will soon be possible to download human minds to a computer, in the circuits of which we will become immensely powerful intellectually and, quite possibly, immortal. This concept drove the plot of the dystopian movie Transcendence (2014) starring Johnny Depp as the Kurzweil-like scientist whose mind was downloaded to the internet – with disastrous results for humanity.
The idea the the mind (or consciousness, if you like, both terms are equally poorly defined) is like “software” to the brain’s “hardware” is just based on the idea that you can have a brain without a mind, such as a dead person. All their organs are still there, they’re just not doing anything. However, in a state of health, the mind appears to be the thing (or at least a thing) that the brain does. The “grand prediction” goes something like this: if you assume that the brain is necessary and sufficient to “do” the mind, and, to be perfectly clear, that there are not spooks, such as the soul or other supernatural agencies, also required to “do the mind”, then if you can represent the working of the brain at a sufficiently detailed level, essentially in simulation, that simulation will also “do the mind”. No one is expecting this to be easy, and it may well be so difficult that it’s not worth doing.
Also, literally every single thing that goes wrong in the movie Transcendence is caused by neoluddite terrorists. Johnny Depp’s uploaded character is benevolent, if a little spooky. He just builds hyper-efficient solar cells, heals people’s spinal injuries, and cures diseases. Terrorists and the FBI react to this by bombing humanity back to the 1800s.
Fortunately, because the IP metaphor is not even slightly valid, we will never have to worry about a human mind going amok in cyberspace; alas, we will also never achieve immortality through downloading. This is not only because of the absence of consciousness software in the brain; there is a deeper problem here – let’s call it the uniqueness problem – which is both inspirational and depressing.
Because neither ‘memory banks’ nor ‘representations’ of stimuli exist in the brain, and because all that is required for us to function in the world is for the brain to change in an orderly way as a result of our experiences, there is no reason to believe that any two of us are changed the same way by the same experience. If you and I attend the same concert, the changes that occur in my brain when I listen to Beethoven’s 5th will almost certainly be completely different from the changes that occur in your brain. Those changes, whatever they are, are built on the unique neural structure that already exists, each structure having developed over a lifetime of unique experiences.
This is why, as Sir Frederic Bartlett demonstrated in his book Remembering (1932), no two people will repeat a story they have heard the same way and why, over time, their recitations of the story will diverge more and more. No ‘copy’ of the story is ever made; rather, each individual, upon hearing the story, changes to some extent – enough so that when asked about the story later (in some cases, days, months or even years after Bartlett first read them the story) – they can re-experience hearing the story to some extent, although not very well (see the first drawing of the dollar bill, above).
At this point, this feels like a semantic quibble. The representation (the change in the brain) is both admitted to exist, but somehow not to represent, and because it’s not exact, it’s not a “copy”.
This is inspirational, I suppose, because it means that each of us is truly unique, not just in our genetic makeup, but even in the way our brains change over time. It is also depressing, because it makes the task of the neuroscientist daunting almost beyond imagination. For any given experience, orderly change could involve a thousand neurons, a million neurons or even the entire brain, with the pattern of change different in every brain.
So yes, it’s hard. And? Last I checked “It’s hard” wasn’t something that made humanity pack up and go home. It’s hard to climb mountains. It’s hard to build airplanes. It’s hard to put robots on Mars.
Also, at least part of the idea is that brains/minds are autopoeic. They create themselves. A potentially useful (if fraught) goal on the route to uploading would be the creation of a minimal set of self-modifying informational structures needed to create a mind. Duplicating one specific mind is certainly a more daunting prospect that creating any mind at all, but again, “It’s hard” isn’t an argument related to whether or not it’s possible.
Worse still, even if we had the ability to take a snapshot of all of the brain’s 86 billion neurons and then to simulate the state of those neurons in a computer, that vast pattern would mean nothing outside the body of the brain that produced it. This is perhaps the most egregious way in which the IP metaphor has distorted our thinking about human functioning. Whereas computers do store exact copies of data – copies that can persist unchanged for long periods of time, even if the power has been turned off – the brain maintains our intellect only as long as it remains alive. There is no on-off switch. Either the brain keeps functioning, or we disappear. What’s more, as the neurobiologist Steven Rose pointed out in The Future of the Brain (2005), a snapshot of the brain’s current state might also be meaningless unless we knew the entire life history of that brain’s owner – perhaps even about the social context in which he or she was raised.
I’m willing to accept that the body is a vital part of the mind, partly because the constant input of the body provides a regulation on certain aspects of the mind. However, I’m not so sure about the second part. I personally don’t have total knowledge of my life, and yet my mind appears to be as functional as it ever was. I would assume that my entire life history could be divided into two parts: those that made significant changes in my brain, and those that didn’t. The ones that didn’t make significant changes will not be present in the current state of my brain, since, by definition, they didn’t make changes in it, while those that did, will be. The distinction between a given person’s social context and life history seems like it was made more for emphasis than any sort of reasoned argument, since it’s not like the two are different from each other.
Think how difficult this problem is. To understand even the basics of how the brain maintains the human intellect, we might need to know not just the current state of all 86 billion neurons and their 100 trillion interconnections, not just the varying strengths with which they are connected, and not just the states of more than 1,000 proteins that exist at each connection point, but how the moment-to-moment activity of the brain contributes to the integrity of the system. Add to this the uniqueness of each brain, brought about in part because of the uniqueness of each person’s life history, and Kandel’s prediction starts to sound overly optimistic. (In a recent op-ed in The New York Times, the neuroscientist Kenneth Miller suggested it will take ‘centuries’ just to figure out basic neuronal connectivity.)
Meanwhile, vast sums of money are being raised for brain research, based in some cases on faulty ideas and promises that cannot be kept. The most blatant instance of neuroscience gone awry, documented recently in a report in Scientific American, concerns the $1.3 billion Human Brain Project launched by the European Union in 2013. Convinced by the charismatic Henry Markram that he could create a simulation of the entire human brain on a supercomputer by the year 2023, and that such a model would revolutionise the treatment of Alzheimer’s disease and other disorders, EU officials funded his project with virtually no restrictions. Less than two years into it, the project turned into a ‘brain wreck’, and Markram was asked to step down.
Again, the fact that a thing is difficult is not proof that it is impossible. Mismanagement of a project is at best, proof that the management was irresponsible or incompetent, not proof that the goals of the project are impossible. As yet, this article has not managed to link its premises (which seem to be that the computational metaphor for the brain is a metaphor, and that the brain isn’t storing representations when it stores representations) with the idea that those somewhat jumbled premises somehow lead to the conclusion that uploading is impossible. Even if copying a particular mind into an executable form on a computer is impossible, elucidating the failings of the computational metaphor does not explain (or even hint at) why.
We are organisms, not computers. Get over it. Let’s get on with the business of trying to understand ourselves, but without being encumbered by unnecessary intellectual baggage. The IP metaphor has had a half-century run, producing few, if any, insights along the way. The time has come to hit the DELETE key.
Your essay’s not good, get over yourself. The business of understanding ourselves would be better served by a coherent exploration of the problems with the computational metaphor, rather than throwing the baby out with the bathwater and claiming a total absence of knowledge in the brain. Such an exploration might not vanquish the problem of uploading, which the author seems to have poorly-examined objections to, but it would at least provide a useful cognitive exercise, and show where our understanding is supported by the metaphor and where it is undercut. In places where this essay approached the handling of the computational metaphor it did raise a number of much more interesting points, but they were unceremoniously dropped in favor of pointing out that computational neuroscience is difficult, which those of us who have actually done work in the field have already noticed.
Raspbian Still Bad
The command “sudo apt-get install arduino” doesn’t get you the Arduino development environment. Instead, when you try to run it from the command line, you get “Error occured during initialization of VM. Server VM is only supported on ARMv7+ VFP”. I get that cross-compilation can be tricky, but this software didn’t get released, it escaped. Arduino isn’t exactly an obscure package.
To be fair, this isn’t because Arduino is broken. It’s because apt automatically chooses a version of Java that can’t run on the Zero W. So any package that uses Java is probably also broken, but I’m not looking into it, because I’m trying to actually do something with the Raspberry Pi. If I wanted to fuck around with a broken package chain, I’d… have gotten my fill of that like 10-13 years ago, so I guess I’d need a time machine. Really, the Pi Zero W is a lot like a time machine, taking me back to a time when Linux was a project, rather than being something you can use for projects.
If you, for some reason, want to use the Arduino IDE on a Pi Zero W, the incantation is to install Java 8 with ‘sudo apt-get install openjdk-8-jre-headless openjdk-8-jre’ and then use ‘sudo update-alternatives –config java’. Then you”ll be running a 5 year old Java and a 6 year old Arduino IDE, but at least the IDE will start up.
Curious Effects Getting List Extents
I have a program that gets a list of GPS waypoints, and wants to figure out their bounding box. The naive way[1] to do this is find the maximum and minimum latitude and longitude, and use the maxes as one corner and the minimums as the other corner.
Off the top of my head, I can think of two ways to do this: Iterate the list of waypoints, comparing to the max and minimum so far, and updating as I go. The list has N points, I have to look at all of them, so O(N), so far so good.
The other way to do it is to do list comprehensions to get the latitudes and longitudes as separate lists, and then call max() and min() on each of those. I would assume that each list comprehension is O(N), and each call to max() or min() is also O(N), since they have to look through the whole list to find the maximum or minimum, and so it is 6 loops over the list (2 comprehensions, 2 max() calls, 2 min() calls), and so this is the slower way to do it.
It turns out, not so much.
I ran the code below on Repl.it and got, usually, the list comprehension version being just very slightly faster to twice as fast. Occasionally, the 10,000 instance case is slower, but not all the time.
import random from timeit import default_timer as timer #Try some different sizes of lists for jj in [10, 100, 1000, 10000, 100000, 1000000]: #Set up N waypoints waypoints = [] for ii in range(jj): lat = (random.random() * 360) - 180 lon = (random.random() * 360) - 180 waypoints.append({"lat":lat, "lon":lon}) start = timer() # One loop maxLat = maxLon = -float("inf") minLat = minLon = float("inf") for point in waypoints: lat = float(point["lat"]) if lat < minLat: minLat = lat if lat > maxLat: maxLat = lat lon = float(point["lon"]) if lon < minLon: minLon = lon if lon > maxLon: maxLon = lon mid = timer() # List comprehensions lons = [float(point["lon"]) for point in waypoints] lats = [float(point["lat"]) for point in waypoints] minLat1 = min(lats) minLon1 = min(lons) maxLat1 = max(lats) maxLon1 = max(lons) end = timer() #Print the results print(f"{jj} points") print(f" first way {mid-start}") print(f" second way {end-mid}") print(f" speedup {(mid-start)/(end-mid)}") assert(minLat == minLat1) assert(maxLat == maxLat1) assert(minLon == minLon1) assert(maxLon == maxLon1)
So why is it faster? Clearly, I’m assuming something wrong. I suspect the main thing that I’m assuming wrong is that the constant 6 multiplied by the O(N) matters. It probably doesn’t, and that’s why we typically drop the constant multipliers in runtime comparisons. It’s likely that list comprehensions and max()/min() of iterables are calls to a very fast C implementation, and are just so much faster than my loop in Python that the fact that I’m doing 6 iterations doesn’t really matter.
Another thing that I’m assuming is that max and min are implemented as linear searches over iterables. It’s entirely possible that iterables store references to their maximum and minimum values, and just return that when asked, rather than going looking. I doubt it, since the overhead on removing an element would be large [2], but it is possible.
I haven’t looked into either of these assumptions, since timing the runs answered the question I had (“Which is faster?”), and the follow-on question (“Why?”) isn’t useful to me at this time.
[1] It does some stupid stuff around the poles and across the international date line, for example.
[2] You’ve removed the largest element. What is the new largest? Time to go searching…
Alternatively, the list could be implemented as a parallely-linked-list, where one set of links is the elements in their list order, and the other set is the elements in their sorted order, but then the list [1, 3, 5, “pickles”, <built-in method foo of Bar object at 0x1f34b881>, 6] doesn’t have well-defined links for the sorted order.
Drag and Drop Python Objects in WxPython
I’m working on a UI for a system that has agents, which have some qualities, and units, which have multiple agents. I want to be able to display each unit as a list, and drag agents from that list to other units, to reassign them.
There are a lot of examples for using drag and drop with text and files, because WxPython provides drop targets for text and files already. One way that this could be implemented is to serialize the dragged objects to JSON, drop them as text, and then de-serialize them. This has some disadvantages, notably that you end up restricted by what you can pass via JSON. I wanted to pass Python objects, so I used pickle.
What I eventually came up with is below. It uses ObjectListView, which is a great wrapper around WxPython’s ListCtrl. On drag, the selected items of the source list are pickled and passed through the Wx drag and drop mechanism. When they are dropped on another ObjectListView, they are then unpickled and added to that ObjectListView (OLV), and removed from the source OLV.
One thing that this code does leave up to the programmer is ensuring that what goes in on one side of the drag and drop is the same as what is expected out on the other side. Another, slightly more subtle thing, is that this uses pickle on the drop data, so it would be possible to have a script that generates malicious pickle data, and lets you drag it from another UI window to my script’s OLV, whereupon it unpickles into something nasty.
That said, if your attacker is sitting at your computer, launching malicious programs and dragging and dropping stuff out of them, you have already lost, and should probably invest in better door locks.
#!/usr/bin/env python import wx import pickle from ObjectListView import ObjectListView, ColumnDefn #pip install objectlistview import wx.lib.scrolledpanel as scrolled # UI with a few list boxes that can be drag/dropped between, and have title bars class Agent(object): # Model of a single agent, has: # identifier (string?) # range (km) # speed (kph) # capacity (integer) def __init__(self, ident, range, speed, capacity): self.ident = ident self.range = range self.speed = speed self.capacity = capacity def __repr__(self): return f"<Agent: {self.ident}>" # Drag and drop Drop target that supports receiving pickled # python data structures and doing something with them. class GenericDropTarget(wx.DropTarget): def __init__(self, object): super(GenericDropTarget, self).__init__() self.object = object self.data = wx.CustomDataObject("PickleData") self.SetDataObject(self.data) def OnData(self, x, y, defResult): #print(f"OnData({x},{y})") if self.GetData(): # unpickle data and do something with it pickled_stuff = self.data.GetData() cukes = pickle.loads(pickled_stuff) # TODO We are making the assumption that a "PickleData" # actually only has a list of Agents in it. # Add some checking before making this a real thing, or # limit the type to a more-specific format like "AgentList" self.object.AddObjects(cukes) return defResult def OnDrop(self, x, y): #print(f"OnDrop({x},{y})") return True def OnDragOver(self, x, y, defResult): #print(f"OnDragOver({x},{y})") return defResult def OnEnter(self, x, y, defResult): #print(f"OnEnter({x},{y})") return defResult class UnitPanel(wx.Panel): def __init__(self, parent, unitName="No name set"): wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY) self.dataOlv = ObjectListView(self, wx.ID_ANY, style=wx.LC_REPORT|wx.SUNKEN_BORDER) self.dataOlv.SetColumns([ ColumnDefn("ID", "left", -1, "ident", minimumWidth=100), ColumnDefn("Range", "right", -1, "range", minimumWidth=60), ColumnDefn("Speed", "right", -1, "speed", minimumWidth=60), ColumnDefn("Capacity", "right", -1, "capacity", minimumWidth=60) ]) self.agents = [] self.dataOlv.SetObjects(self.agents) self.dataOlv.Bind(wx.EVT_LIST_BEGIN_DRAG, self.OnDragInit) # Set up a drop target on the listview dt = GenericDropTarget(self.dataOlv) self.dataOlv.SetDropTarget(dt) # Set up a title for this box self.unitLabel = wx.StaticText(self, id=wx.ID_ANY, label=unitName) mainSizer = wx.BoxSizer(wx.VERTICAL) mainSizer.Add(self.unitLabel, proportion=0, flag=wx.ALL, border=5) mainSizer.Add(self.dataOlv, proportion=1, flag=wx.ALL|wx.EXPAND, border=5) self.SetSizer(mainSizer) def populate(self, units): self.agents = [] # for unit in units: # self.agents.append(Agent(unit["ident"], unit["range"], unit["speed"], unit["capacity"])) # self.dataOlv.SetObjects(self.agents) for unit in units: a = Agent(unit["ident"], unit["range"], unit["speed"], unit["capacity"]) self.dataOlv.AddObject(a) #self.draggableURLText.Bind(wx.EVT_MOTION, self.OnStartDrag) def OnDragInit(self, event): # Get all the selected items from this list selected = self.dataOlv.GetSelectedObjects() # Pickle them and put them in a custom data object pickled_selection = pickle.dumps(selected) drag_obj = wx.CustomDataObject("PickleData") drag_obj.SetData(pickled_selection) #Create a drag and drop source from this ObjectListView src = wx.DropSource(self.dataOlv) src.SetData(drag_obj) print("Drag started") result = src.DoDragDrop(wx.Drag_DefaultMove) if result == wx.DragCopy: # We don't copy because agents are hardware self.dataOlv.RemoveObjects(selected) elif result == wx.DragMove: # Remove the data from here, add it to another list self.dataOlv.RemoveObjects(selected) else: # Default, do nothing print("Nothing, nothing, nothing at all") class AssetFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, parent=None, id=wx.ID_ANY, title="ObjectListView Demo", size=(800, 600)) self.panel = scrolled.ScrolledPanel(self, id=wx.ID_ANY) self.mainSizer = wx.BoxSizer(wx.VERTICAL) self.panel.SetSizer(self.mainSizer) self.panel.SetupScrolling() self.Show() def populate(self, config): for unit in config["units"]: unit_panel = UnitPanel(self.panel, unitName=unit["name"]) unit_panel.populate(unit["agents"]) self.mainSizer.Add(unit_panel) if __name__ == "__main__": app = wx.App(False) # We're going to need to be able to populate the frame from the config, # so represent the data as a data structure and initialze with that config = {"units": [{"name": "Unimatrix 01", "agents": [ {"ident": "7 of 9", "range": 10, "speed": 10, "capacity": 12}, {"ident": "Third of 5", "range": 10, "speed": 10, "capacity": 12} ]}, {"name": "Unit 2", "agents": [ {"ident": "u2s1", "range": 10, "speed": 10, "capacity": 12}, {"ident": "u2a2", "range": 10, "speed": 10, "capacity": 12}, {"ident": "u2a3", "range": 10, "speed": 10, "capacity": 12} ]}, {"name": "Unit Foo", "agents": [ {"ident": "bar", "range": 10, "speed": 10, "capacity": 12}, {"ident": "baz", "range": 10, "speed": 10, "capacity": 12}, {"ident": "quux", "range": 10, "speed": 10, "capacity": 12} ]}, {"name": "Enterprise", "agents": [ {"ident": "Galileo", "range": 10, "speed": 10, "capacity": 12}, {"ident": "Copernicus", "range": 10, "speed": 10, "capacity": 12} ]}, {"name": "GSV Insufficent Gravitas", "agents": [ {"ident": "GCU Nervous Energy", "range": 1000000, "speed": 3452334, "capacity": 13452342}, {"ident": "GCU Grey Area", "range": 1000000, "speed": 234523546, "capacity": 234562312} ]}] } frame = AssetFrame() frame.populate(config) app.MainLoop()
I called the unpickled data “cukes” because this is demo code, and I was being silly. A cucumber is, after all, what you get when you undo the process of making pickles. You may want to change that if you copy/paste this into production code.
A Flat Earth Would Be Odd
I’m not sure what “flat earthers” actually believe, but assuming the world is literally flat leads to some interesting results. For the sake of keeping things simple, lets assume that the world is flat like a coin: locally bumpy, but overall shaped like a disk. This assumption is based on what the word “flat” means. A saddle isn’t flat, so a hyperbolic-curved earth doesn’t count as “flat” in any reasonable way. Further, lets assume that it keeps the same surface area that the shall we say “conventional” model claims that it has. This assumption lets us avoid the absurdities [1] required to preserve distances, and so travel times, while unwrapping a sphere to cover a disk.
These assumptions tell us how big the disk is. The earth’s surface area is allegedly 196.9 million square miles. A disk’s surface area is given by pi * r2, so do the math to get r and you wind up with a radius of 7.916 million miles. This may present astronavigation problems, as the moon is only 238,900 miles away, so it might hit the disk… if the moon were real! [2]
Ok, so we all live on a disk that’s about 16 million miles across. Because I’m comically egotistical, I’m going to say that my home town is in the middle of the disk, equidistant from every edge.
Now we come to an interesting point: How thick is the disk? Let’s assume that we believe in gravity. The gravity in my home town is one G, and it causes objects to fall down, which is to say “towards the surface of the earth”. Under the conventional model, this is because the earth is under me, and so the gravity caused by the large mass of the earth exerts a force on objects above it. Now there are two ways we can go: either the earth is made of the stuff that it is observed to be made of, and has the density it is generally observed to have, or it’s made out of something far more dense. All that this really varies is how thick the disk is under my home town. To have 1G there, using the conventional materials, requires at least the alleged thickness of the round earth, which is to say about 7,917 miles. Using something denser makes it thinner, without affecting the gravity, but there are limits on how dense matter can get.
Ok, so far, so good. However, we’ve set a little bit of a trap for ourselves here. Everywhere you go on the surface of the earth, the gravity is about 1G, so everywhere you go, the disk earth has to be about 8k miles thick. In my home town, at the center of the disk, this isn’t a problem, because the gravity in all the other directions balances out.
What’s that you say? Yes, gravity in other directions. You see, we’re talking about a disk that measures about 8k miles thick and 16M miles across. If you’re in the center, there are equal amounts of disk around you in all directions, so the pull in all the other directions balances out. If you’re off center, there’s more mass on one side of you than on the other, and so there is a component to the gravitational pull that isn’t straight down, and is unbalanced by the ratio of how much mass is on each side.
Initially, this would probably be pretty subtle. Things would fall a little bit in the direction of my home town, but more or less straight down. Friction would suffice to keep things on surfaces, but round things would always roll towards my home town. It would only be a little harder to walk away from my home town than towards it. I doubt it would affect which way water goes down the toilet all that badly, although the water would pile up on one side of the bowl. However, as you got towards the edge, things would get FUCKING DIRE.
How dire? Well, lets look at the volume of that disk earth, which is properly a cylinder now that we know how thick it is. A cylinder that’s 16,000,000 miles across and 8,000 miles thick has a volume of 6,430,000,000,000,000,000 cubic miles. The conventional model earth has a volume of 260,000,000,000 (that is to say, 260 billion) cubic miles, and exerts a gravitational pull of 1G when you’re on the surface, which is to say that all of it is under you. When you’re on the edge of the disk earth, which is to say that almost all of it is, say, east of you, it exerts a gravitational pull of (around) 24,730,769.2308G. So to understand the force exerted on some poor schmuck who happens to get teleported from my town to the literal eastern edge of the world, assume that the ISO standard schmuck weighs 150 lbs. He will suddenly experience a thrust of about four billion pounds of force to the west. For comparison, a Saturn V rocket generated about 7.5 million (with an “m”) pounds of thrust, or about 500 times less thrust than people living on the edge experience as a consequence of just being there.
Unfortunately, since some of that force (at least 1G of it, thanks to the thickness of the disk) is downwards, towards the center of mass of the disk, rather than the location of my home town, the schmuck is going to hit the ground going absurdly fast and get spread all over it.
But wait, what is that ground made of? We said earlier that this disk is made out of normal earth stuff, which you can go out and observe to be mostly silicate-based rocks. The rocks under my home town have about 8 million miles of rock around them, pressing in towards the center of mass of the disk. Extremely weird stuff happens to matter under those kinds of pressures. Hydrogen (theoretically) becomes a metal. Atomic nuclei get mashed into each other.
That said, my home town is going to have other problems. For example, all the water in the world, and all the air, and all the stuff that’s far enough away to experience mostly-sideways gravity, is all going to flow towards the center of mass of the disk, and some of it will be coming in very fast. Since my town is barely above sea level under the conventional model, I think it’s going to get both extremely hot, due to the abrupt change in pressure, and rather wet, although possibly not before the disaster of degenerate matter that’s forming under it gets to the surface.
Alright flat-earthers, you got my home town into this, you get it out. Why are none of these effects observed on the ostensibly flat earth that we live on?
Well, maybe it’s not 8,000 miles thick. Maybe, it is in fact quite thin, and They can manipulate gravity to provide ~1G everywhere you go. They put some thickness everywhere that anyone decides to dig, or anywhere a tree falls over, but everywhere else it’s…. 1 inch thick. One inch is pretty thin, but that still puts the volume of the disk around 99,804,672,000,000,000 cubic miles, and so the inwards G-force experienced by someone on the edge at around 383,864.123G. This is still a troubling amount of force, but clearly if They can provide 1G over the whole surface of the earth, They can sort this out too.
That said, how long have They been doing this? If the earth has always been a disk, then obviously They were doing it before we evolved, so they’re not human. If They did it recently, why did no one notice the change? Was that the “road work” that was making my commute to work slow this morning? Either way, this moves “Them” from the category of “Federal/NWO government conspiracy to hide the truth, man!” to “Capricious god or gods with odd senses of humor”. At that point, there’s no use arguing what shape the world is, because it might be different tomorrow.
[1] These absurdities extend from the simple “everyone who has ever traveled is part of the conspiracy and lies about how long it takes” to the complex “THEY (It’s always ‘they’, innit?) can alter spacetime to slow or speed up travel”.
[2] Spoiler alert: it is.
ToyBrain Rides Again
Now with WiFi, current monitoring, and the ever-worrying li-poly battery chemistry.
I haven’t tested the WiFi module or motor drivers yet, but the board is fully populated and the battery regulation circuit works.
There are a few design changes in the pipeline, but I’m going to go for a full hardware test and try to find more bugs before I create version 2 of the boards.
The current design is in github, along with all the docs.
You've failed me for the last time, Register.com.
I tried paying to renew my domain at register.com. I tried 5 times. In a normal business, if you try to pay, the business usually takes your money. Not register.com. So I’ve transferred my domain to 1&1, who will hopefully be able to take my money and provide me with goods and services in exchange.
Current State of The ToyBrains
The fuse settings on the current device are low:0xe2, high:0xda, and extended:0x5. I can talk to it via ICSP, and get the correct component signature (0x1e9514) back. What all of this says to me is that the ICSP settings are correct, and the onboard oscillator is running, so the chip is capable of having the bootloader installed.
It is entirely likely that I was using the wrong bootloader for my boards. I am using an ATMega328 running at 8MHz, so I suspect that the correct bootloader is ATmegaBOOT_168_atmega328_pro_8MHz.hex. This is important because an bootloader created for the wrong clock speed can still be loaded onto a board, but won’t be able to communicate over the serial port. The timings of the serial signals would be messed up, because any delay operations will become either too long or too short, depending on if the clock is too slow or too fast.
I got the latest version of the Arduino IDE, and modified the appropriate files as described at the end of this entry. In order to burn the bootloader, I had to be root, so I started the Arduino IDE as root and burned the bootloader, which apparently worked on the first try.
I quit and restarted the IDE, because I didn’t want to keep running as root, and plugged in my FTDI cable. Unfortunately, the IDE couldn’t compile my little test program because the arduino IDE ships with an old version of avr-gcc (4.3.2) and the ATMega328 wasn’t supported until later. I have avr-gcc 4.5.3, so I renamed the avr folder in /arduino-1.0.5/hardware/tools to avr_old. This forces the IDE to use the system avr-gcc, because it can’t find its own. With this, I was able to compile.
Next, I attempted to upload the compiled program to the board. The upload failed with the error message “avrdude: stk500_recv(): programmer is not responding”.
I switched to using the programmer to upload the sketch, and wrote a sketch that blinks an LED on analog pin 5. Originally, the sketch used analog pin 7, because that’s where my debug LED is hooked up, but it turns out that while you can use A0-A5 as digital outputs, you can’t do that with A6 or A7.
At any rate, the system can now blink an LED on A5. This verifies that the onboard clock is working, that the memory can be written to, and that the compiler is generating valid code. The clock speed is even correct, because a blink program with a 1 second period even generates 1 second blinks.
Now I just need to figure out why uploading via USB/serial doesn’t work, and I’ll be golden.
Recent Comments