Friday, March 10, 2017

Nostalgia: mid-December 2001 in Vienna, Virginia

It's December 15th 2001 in our house at Wolftrap Road, Vienna, VA 22182, USA. It's our first US Christmas (Happy Holidays!) and we're determined to do the right thing.

We had popped off to Walmart to buy seasonal reindeer. Taking a cue from IKEA, a Walmart reindeer comes in a rectangular box. Who better to handle 3D reassembly than Clare?



This is meant to be a reindeer?


Assembled, plugged-in and working. Take a bow!


"You do have permission to pop out and hunt the squirrels."

To be fair, this picture of our puzzled cats was taken a month earlier, in mid-November .. before the deep snow which would totally baffle them. We naturally let our cats roam free to the amazement of our American neighbours, who firmly believed that 'kitties' were house-animals.

---

This is the third time these pictures have aired here, in case they seem over-familiar.

Thursday, March 09, 2017

Replika is massively oversold

Replika was originally going to be your own, online personal doppelgänger. Given the current state of the art with chatbots (tiresome and useless), that was always going to be a stretch.

The current PR says:
"Replika is your personal AI friend that you nurture and raise through text conversations. It is a lifetime companion who is always there for you, chats with you, keeps your memories, and helps you become more connected to yourself."
They're busy trying to create doable spin-offs such as a personal diary ("A Cute Diary That Keeps Itself").

Given date-slippage, I had thought that the whole Replika thing might have silently collapsed, but I suppose there is no shortage of people who are happy to update a super-Eliza forty times a day with details of their every mundane activity.

Facebook.

There would be a lot of interest in a virtual friend, endlessly attentive and caring  (except that's not a friend, more a courtier - artificial sycophancy). But if this were in the state of the art, one of Google, Microsoft, Facebook, Amazon or Baidu would have done it already. It's plainly on the future roadmap for the plethora of voice assistants, but today's systems are no more than super-recognisers.

---

Have you ever had the experience of being in a technical meeting, in an area not wholly in your sphere of competence, and suddenly you lose the plot? For a moment, you just don't know what everyone else is talking about. You pray no-one will ask for your opinion.

If you're lucky, in a minute or two the topic will move on and you will rejoin the shared context.

What happened there? The participants shared an internal cognitive model of what the conversation was about, and yours frayed. But no chatbot today can maintain an internal model of any complexity.

Worse: the topics of mundane discourse are open-ended, rooted in a complex culture and often private. Do we even want our AI-in-the-cloud to share personal and family intimacies, possibly with any interested intelligence agency?

---

Your Replika AI friend is going to get 40 bland texts per day from you. Some of the questions already seem rather intrusive.



There is a hint of blank-slate about current AI. As if one standard optimised neural-net architecture could create the ideal artificial personality template, which then gets loaded with data to become an individual.

We know that people aren't like that. Common experience and psychometric data tells us that people have distinct personalities, that these are strongly heritable and resistant to change. We all know, as folk psychologists, that we deal with people as distinct individuals, not clones. And that most of those differences are innate and resistant to social influences.
"She thinks she can change him!"
No she can't.

So many mountains to climb.
  • Why is the brain structured as modules, not one uniform design?
  • How is the architecture of personality differences implemented?
  • How to immerse an AI in common knowledge, culture and mores?
  • How does social deftness, tact and propriety work?
  • What's an effective, useful and pleasant engagement model - corporeal?

Yes, I am prepared to be disappointed with Replika.

---

Update: 9th March 2017.

"Replika AI to launch on the App Store

"Today, we are excited to announce that Replika will appear on the Apple’s App Store on March 13 at 12:00 AM Pacific time. We’d like to thank all the participants of the app’s preview in Testflight for the incredible feedback that helped us shape the app."

Wednesday, March 08, 2017

High Intensity Interval Training

Amazon link

The Times says today, "Work out in short sharp bursts to slow the ageing process".
"American researchers led by a group at the Mayo Clinic in Rochester, Minnesota, now believe that short but vigorous bouts of effort boost the activity of genes that govern mitochondria, the power plants in muscle cells."
Of course we knew all this from Michael Mosley's BBC programmes a while back. Still, in the spirit that a little extra knowledge is not a bad thing, I considered buying Mosley's 'Fast Exercise' book but indifferent reviews pointed me instead to James Driver. This review seemed pretty balanced.

From Amazon reviewer Iain Rutherford:
"This book is very short, despite that, however about 10% of the way into the book I almost came close to putting it down and never picking it up again. The book is badly written and the initial parts of the book read more like anti continuous training (CT) propaganda rather than an introduction to HIIT. The means of referencing actually started to wind me up as it was impossible to follow the methodology applied with reference 10 being stated before reference 8 and so on. Some of the claims that are made in order to justify the authors love of HIIT and discrediting of CT are just not true ... this combined with the occasional meaningless graph that has no legend and no values on the axis grated on me. Finally the obscene overuse of exclamation marks made me feel like I was reading fan fiction rather than a serious book on an introduction to a type of training.

"All of that said, the book had massive turn around after the first 33%. At this stage the author starts to talk about HIIT, the means to doing sessions, rough programs and lay out of sessions. The means and ways that you can actually apply HIIT. It suddenly became a very good read, well laid out and discussed, even the exclamation marks died down to acceptable levels, it was almost as if a different author had taken over. That part of the book is well worth reading and actually bumped the score up to 3 stars, if the initial part of the book hadn't existed I would probably have given if it 4 to 5 stars. I'm now using the training and feel it is beneficial, this book has given me a great insight into the means to incorporating HIIT sessions into my training and in time I'm sure I'll be able to use it for other people's training.

"As my title says, just ignore the first third of the book, then read, you'll get a lot more from it and be less likely to get annoyed with it."
So it's due to arrive tomorrow. This morning I hit the exercise bike for five whole minutes with two high-intensity 30 second sessions. Yep, definitely felt better, and after a shower I felt my mitochondria had quite perked up.

---

Update: 9th March 2017.

The book arrived today. It's a lightweight read, just the kind of thing you'd expect a personal trainer to write. I can't say I learned anything substantial, although there were some 'how to' points worth reviewing. For example:

  • how hard the high-intensity phase (100% - hard as possible to failure; 10 - 30 secs),
  • how many reps (4 would be ballpark), 
  • how long recovery (10 seconds - harsh! - 30 secs through to two minutes), 
  • how long the HIIT session should be (no more than 30 minutes c. three times a week),
  • Warm up and down; stretch afterwards but not before - with recommended stretches. 


That kind of thing.

It's worth a flip-through but I'm not sure it's worth the money - probably get all that stuff for free on the Internet. Also, he's not a good writer - it's rather dry. I'd say three stars at most.

Tuesday, March 07, 2017

Stonehenge: ten years after

We were at Stonehenge a few weeks ago, on February 15th. But checking my records, we also visited ten years ago, on March 3rd 2007.


Clare at Stonehenge: March 3rd 2007


Clare at Stonehenge: February 15th 2017

We'll obviously be back to check they're still there in late Winter 2027.

Top 10 Replicated Findings From Behavioral Genetics

The classic paper from Robert Plomin, John C. DeFries, Valerie S. Knopik, and Jenae M. Neiderhiser.
"In the context of current concerns about replication in psychological science, we describe 10 findings from behavioral genetic research that have replicated robustly. These are “big” findings, both in terms of effect size and potential impact on psychological science, such as linearly increasing heritability of intelligence from infancy (20%) through adulthood (60%).

Four of our top 10 findings involve the environment, discoveries that could have been found only with genetically sensitive research designs. We also consider reasons specific to behavioral genetics that might explain why these findings replicate."
James Thompson has a good post which summarises the theses: "10 Replicants in Search of Fame", with an endearing introduction centred around Philip K. Dick's aphorism:
Reality is that which, when you stop believing in it, doesn’t go away.
I used to think that as the genomic revolution rolled on, social scientists everywhere would wake up, smell the coffee .. and proceed to revolutionise their disciplines.

That was until I encountered Conley and Fletcher.

Saturday, March 04, 2017

And perhaps the horse will learn to sing

The empire is a monarchy run by a hereditary aristocracy with traditional gender roles. It is in the throes of civil war, fighting to re-integrate secessionists and 'outies'. And then it discovers the moties, seemingly pleasant and civilised - and keen to expand into the empire's territory.

Shouldn't we welcome these charming immigrants, with so much potential for diversity, cultural enrichment and trade?

---

I read aloud (and recorded) "The Mote in God's Eye" over thirty eight evenings in sessions ranging from 30 minutes to more than an hour.

Clare often falls asleep, and you may hear her snoring. Sometimes we're interrupted by phone calls and people at the door. The clock chimes tend to stop me in my tracks. Sometimes I get quite emotional. I can't do Scottish accents.

Quality stuff then.

The format is .m4a and the app I used to record and playback is Easy Voice Recorder Pro.

You can listen to the chapters here. Ideal for those long car journeys or at bedtime.

---

Trigger warning: everything about this book is liable to offend prevailing mores.

Jerry Pournelle quotes (including this post's title).

Friday, March 03, 2017

Diary: programming is hard!

I remember a post by James Thompson (can't find it - sorry) describing the joy of giving IQ tests to bright students. Their smug condescension as they breeze through the early items; their horror as they hit their cognitive limits and start to sweat: "Wait a mo, .., just can't seem to see it ... ."

In artificial intelligence textbooks it's standard to cover the coding of theorem provers for propositional-calculus. Hidden away in the advanced exercises is the suggestion to extend the program to cover the full predicate-calculus. Inevitably, this is flagged as hard.

Tell me about it. Today I got basic binary resolution to work. Great! I can do inference. And yet this is not the central mystery of a predicate-calculus resolution theorem prover (RTP).

The conceptual problems arise from the layers of abstraction around the proof procedure. At the risk of boring you even further, binary resolution is driven by the unification of complementary literals (basic formulae). These two literals occur in the two clauses offered to the resolution function (hence binary resolution).

A  problem addressed by an RTP comprises: assumptions  = the axioms, a set of clauses, plus the problem itself, a goal clause.

Here's my working example. First come the axiom clauses:
(defvar *c3*   (mk-fact-clause '(likes rod horvath)))
(defvar *c4*   (mk-fact-clause '(likes sally renner)))
(defvar *c5*   (mk-fact-clause '(likes sally rod)))
(defvar *c6*   (mk-fact-clause '(likes hardy renner)))
(defvar *c7*   (mk-fact-clause '(likes hardy rod)))
(defvar *c8*   (mk-fact-clause '(amusing hardy)))
(defvar *c9*   (mk-fact-clause '(likes horvath moties)))
(defvar *c10* (mk-rule-clause '(likes sally ?x) '((likes ?x moties)) ) )
(defvar *c11* (mk-rule-clause '(likes rod ?x) '((likes ?x renner) (likes ?x rod)) ) )
(defvar *c12* (mk-rule-clause '(likes ?x ?y) '((amusing ?y) (likes rod ?y)) ) )
(defvar *c13* (mk-fact-clause '(likes ?x ?x)))

(defvar *g1* (mk-goal-clause '((likes sally ?who)) ) )  ; this is the problem clause
You may notice a "Mote in God's Eye" theme here.

Despite the simplicity of these facts and rules, you'll struggle a bit to figure out the complete list of who, exactly, Sally Fowler likes.

I expect better from my program - once completed.

---

So a clause might look like this (which you will recognise as a Prolog-style Horn-clause):
'( (likes sally ?x) ← ((likes ?x ?y) (likes ?y moties)) )   ; a rule clause
which is already a bit complicated.

Then we have to set up structures for the knowledge-base (facts and rules), the goals which emerge from the resolution process, and the pointers and bindings which allow a reconstruction of proofs.

---

In telling you this, my intention is not to document the program, my point is more psychological.

You need to keep a very great deal of abstract structure in your head simultaneously if you hope to put this not-entirely-trivial program together. Plus lots of functions.

It's very g-loaded, much like doing mathematics.
"It's quite hard getting figures but ... it appears that the average IQ of students applying for PhD programmes at good universities in computer science is around 128.

"That sounds right to me. Most software development companies don't take people without good first degrees or a higher degree in a STEM subject - and that's just the pool we're talking about here."
---

Parenthetically, thank God for Lisp, a gift from the deity for clear, conceptual, exploratory thinking.

---

I read endless texts in the media from innumerate journalists about how unemployed or newly-redundant workers are going to retrain as software developers. Those writers couldn't hack it themselves and sadly, neither will most of those no-longer-required workers.
"Wait a mo, ..., just can't seem to see it ... ."
At an IQ threshold of 128, we're talking about 2.5% of a population normed at 100.

A caveat. It's intellectually hard writing machine learning programs or configuring recalcitrant artificial neural nets on novel problem-domains .. or programming RTPs. Yet for everyone doing those things, there are ten people paid to use graphical web design tools or load databases, or do a bit of scripting. Things which are not that hard.

Like many occupations, there has been mission-creep in the definition of software developer.

---

And why am I making such heavy weather of this wretched theorem-prover? This.

Thursday, March 02, 2017

Urban warfare just became easier - thanks to Google

From the estimable Boston Dynamics via foreXiv.

You need to watch this video all the way through .. and be very afraid.



"Handle is a research robot that stands 6.5 ft tall, travels at 9 mph and jumps 4​ ​feet vertically. ​It uses electric power to operate both electric and hydraulic actuators, with a range of about 15 miles on one battery charge.

Handle uses many of the same dynamics, balance and mobile manipulation principles​ found in the quadruped and biped robots we build, but with only about 10 actuated joints, it is significantly less complex. Wheels are efficient on flat surfaces while legs can go almost anywhere: by combining wheels and legs Handle can have the best of both worlds."
I have a vision of a swarm of those things clearing ISIS territory, toting AKs or M16s.

---

Incidentally, Google owns Boston Dynamics. This from The Guardian:
"Google’s parent company Alphabet is reportedly looking to offload Boston Dynamics, following tensions within the company about its subsidiary’s fit within the wider corporate culture.

"After a previous robotics video was posted to YouTube, Google communications staff sought to distance the company from the hardware, according to emails leaked to Bloomberg News, citing the feeling that such technology could be “terrifying”.
Please don't let me be the first to ask 'Handle' very politely, "Don't be evil"!

Wednesday, March 01, 2017

Diary: chronicles of wasted time

There were several things I toyed with writing about today.

1. China MiĂ©ville on the Nazis

The Nazis (short for National Socialists, lest anyone forget) are uniquely demonised in contemporary culture. It's not so much that the Nazis did uniquely bad things - most of their heinous deeds recapitulated acts previously implemented by many other powers: in fact the Nazi edge in atrocity tended to be greater efficiency. Nazis are demons mostly because they took such pride in their murderous policies. They were the paradigmatic nasty party. They flagrantly and consistently failed to show generalised compassion.

Readers familiar with Jonathan Haidt's Moral Foundations Theory will recognise the red-flag value-atrocity for liberals here. By promoting the 'Aryan race' and classifying Jews, homosexuals, the disabled and non-'Aryans' in general as sub-human (and therefore worthy of extermination), Nazism was xenophobia personified.

You can see why nationalists like Trump, Le Pen and the rest are so easily compared to Hitler. Shockingly, they explicitly disavow liberal globalism and human universalism.

We know the 'downsides' to Nazism, strongly amplified by the fact they lost. But the Pollyanna world of Liberalism - where everyone is 'nice' all the time - doesn't always reflect reality either.

Especially when you engage with people who don't tend - or intend - to play nice at all.

Ordinary folk are generally not liberals, and once the liberal elite makes a hash of it they get somewhat agitated. How agitated? Depends on how bad things get.

The Nazis were quite popular in the grim thirties, and not just amongst ordinary Germans.

Somehow these deeper truths about human nature - and what humans will do to survive in extremis - appear to have evaded China Miéville. The root causes of fascist movements aren't really manifest through the metaphor of shallow, lifeless Nazi art.

Anyway, I decided, meta-fictionally, not to write about that, because writing anything at all about the Nazis gets you into trouble.


2.  Who's going to win the French Presidential Election 2017?

The first round is Sunday, 23 April and the second round is two weeks later, 7 May 2017. The Media is gushingly excited that Emmanuel Macron of En Marche! will win the second round decisively against Marine Le Pen of the Front National.

Take that, you fascists!

---

*Eyebrows raised*.

Macron is somewhere between the Tony Blair and Nick Clegg of the French governing elite. And about as popular as either amongst the non-bubble masses.

In The Times today, British neocon op-ed writer Roger Boyes calls it for Le Pen, citing subterranean popular discontent.
"Le Pen has kept momentum; she has (unlike Ukip) a proper party machine behind her which is able to guarantee that declared voting intentions turn into actual votes. She is polling at 45 per cent if she runs against François Fillon in the second round; not many on the left will be able to vote for a man who promises to cut half a million public service jobs.

Against Emmanuel Macron she is polling at 42 per cent in the run-off; it doesn’t take much more to give her victory. That’s Macron, the pro-European, elite-educated, former investment banker Blairite who once served as economics minister under François Hollande — how desperate does a country have to be to imagine that he could be a saviour, rather than a prettifier of the old politics?"
I am not quite so sure. I suspect the French media will do a pretty good job on Le Pen, accusing her of plotting to break up the EU - something which the French masses still find scary, with all those old Nazi occupation memories and a resurgent Germany.

If I had to call it, I'd agree that Macron is toast, even froth. But this Penelopegate thing is perhaps forgivable by a cynical electorate; if so, François Fillon's traditionalist nationalism will strike a chord in the second round.

If he gets that far, it's winnable for Les RĂ©publicains.

Anyway, I was going to write about that but .. what do I know about French politics?


3. And what about your theorem prover?

Yes, hmm, shuffles papers. You know, I thought and thought about the control architecture. I'm good with unification and binary resolution - all those functions are well-understood and work. But generating the proof space (which Prolog does by depth-first search with backtracking) is a bit intricate and involves quite complex clausal data structures, particularly if you want to number clauses, and keep track of previous goals and bindings to generate an explicit proof tree.

So it's a bit, well, .. boring - and I feel under-motivated today. Which is why I'm wasting my time telling you all this.

Resolution: subsumption, factoring etc

Binary resolution is the core inference rule of a resolution theorem prover, but there are some other things you may choose to do, or you may have to do, to prune the search space of ever-expanding resolvent clauses or to find a proof.

The pictures below are very hand-wavy: to understand what is going on, refer to the three slide sets from Imperial College referenced towards the end of this post.

Note that 'mgu' is 'most general unifier', the list of mappings from variables to other variables or constants which can make two terms identical.

P(a,y,z) and P(x,b,w) unify to P(a,b,w) with mgu = {x → a, y → b, z → w}.


1. Basic Resolution and Factoring



2. Why do we rename clauses?


Because x can't be bound to 2 different things. Rename x in the 2nd clause to y and we're good.


3. Subsumption and Tautology Deletion



Subsumption and factoring are complicated. You can win by removing redundant clauses, lose by the time it takes to do so. Sometimes you have to do it to get a proof. Other times, too much enthusiasm can make a proof impossible. Slides 6 below has more.

Imperial College has long had high-quality material on the theory and design of resolution theorem provers. An excellent set of slides (PDF) can be downloaded from here.

For design and implementation see particularly:

The directory of this excellent and comprehensive slide set is here.