Sunday, June 16, 2013

My new digital personal assistant for android

During the summer we will be driving around France. I imagine a hi-tech car park where you have to do something smart with your phone to pay for parking. What a hassle! Wouldn't it be nice to have a smart PA system on your phone which could just sort the details on your behalf. This would need a common interface standard: I wonder whether Google and Apple (Siri) could get together? Then I thought: Google? Do they even have a personal assistant?

Yes.



I have downloaded the recommended system to my phone and will shortly join that eccentric crew who talk to their phones with no-one at the other end. What ever next - "Hey Glass"?

Continued: chatbots


Talking Angela (above after skipping the ad) seemed the most polished of the smartphone chat bots, with its fancy avatar (a cat, Angela, in Paris) and its voice input/output. It installs easily enough on my phone but is a disappointment. It's a free app and makes its money by continually steering the conversation into money-making opportunities. Ask Angela to sing and a music-video type screen open up with some cute graphics and a prominent banner "buy this song"; try to focus the conversation onto your own problems in life and Angela will solicit a 'present' for a 'friend' of hers: it'll cost you.

As Lord Sugar would say, my search goes on ...

UPDATE: Tuesday June 18th 2013

Talking Angela (perhaps we should call her grasping and avaricious Angela) didn't last long: within 24 hours she was uninstalled. The Google 'speaktoit' assistant made it through to this morning when I was offered a 'Daily Briefing' notification - when I tapped it, the avatar started briefing me in loudspeaker mode and an american accent - I was sitting in a crowded doctor's waiting room at the time. She got uninstalled in ninety seconds! To be fair, she was pretty incompetent answering queries: not at all a replacement for Google web search.

Saturday, June 15, 2013

Six-month weight trend line: Jan - June 2013

Since I started Michael Mosley's 'Fast Diet' in August 2012 I've been taking digital weight measurements most days. Today I entered this year's dataset into an Excel worksheet and plotted the scatter diagram shown below. Days since Jan 1st 2013 are on the x-axis, weight (in kg) on the y-axis.

I've added the regression line. The R-squared statistic for this data set is the square of the correlation coefficient, so the correlation between weight and elapsed-time is around 0.7. This shows a real trend.

The bouncing around of the data from the trend line reflects days of eating and days of fasting.  Food taken on board during an eating day can weigh of the order of 1.5 - 2 kilograms. This gets mostly metabolised into water, carbon dioxide and solid waste over the next day or two. Hence the jagged shape to the data based on fasting two days a week. The data tends to cluster within +/- 1 kg of the trend line.

I have a target: be at a mean weight of 68 kg = 10 st 9.6 lb and wobble by around +/- 2 pounds during a typical week. The trend line says I will get there on September 6th 2013.

My weight (kgs): Jan 1st - June 15th 2013
During a  six day holiday at day 125 I didn't weight myself for almost a week. I interpolated the data and you see a suspiciously straight line - and a certain amount of weight gain!

Wednesday, June 12, 2013

The Raised Bed (continued)

People have asked how the Raised Bed is coming along. This:

As constructed

As of Weds June 12th 2013
We have a blocked-off chimney running vertically within a wall of our kitchen, next to where I type this. A bird has fallen down it, doubtless a fledgling, and it's making piteous scrabbling sounds as it tries to escape. Plus the odd cawing sound something like the cat when it's trying to attract attention. Sad.

(By the way, it's not the cat: that animal is in its usual state of somnolence on the couch).

Monday, June 10, 2013

Good Military SF

Like Kingsley Amis in his later years, have you lost patience with formless literary fiction? Do you want to wallow in the warm glow of our military blowing enemy aliens to blobby shreds? Want well-written page turners featuring ever-so-slightly stereotypical characters?

What you need is good old-fashioned space opera; smart military SF starting with John Ringo and the war against the Posleen.
Book 1 of the Posleen war series
In four volumes: A Hymn Before Battle (2000), Gust Front (2001), When the Devil Dances (2002) and Hell's Faire (2003) you will fight with Earth's finest against the remorseless Posleen and their nefarious galactic puppet-masters. And two of the volumes are free on Kindle!

Then, after you emerge from the gore, it's time to hit space with The Praxis.
Don't trust those Naxids!
Walter Jon Williams wrote four volumes in the Dread Empire's Fall series looking at the aftermath of the death of the last of the galactic overlords, the Shaa. The alien races of the Shaa's empire are soon at war and our military heroes are Lieutenant Gareth Martinez, a very-smart-but-provincial peer, and Cadet Caroline Sula, the very-smart-but-with-a-shady-past head of the Sula clan: so no stereotypes there, then.

So, lock and load, hit dirt and enjoy!

Iain M. Banks

I was very saddened to hear that Iain Banks has died. I guess I should say Iain M. Banks, as I much preferred his science-fiction.



Depressingly, the BBC news report lauded Banks' work purely in terms of his non-SF titles: "The Wasp Factory", "The Crow Road" ('made into a television film'). Banks' enthusiastic, exuberant nature was always better expressed in his Culture novels, which became increasingly complex and baroque: there is not one where I can, off the top of my head, succinctly and accurately summarise the plot. Banks once said that "Use of Weapons" as originally conceived required the reader to think in 'six dimensions'. I believe he thought that careful rewriting had dimensionally-reduced the novel, but IMHO his entire Culture oeuvre resisted such compactification.

That difficult 2nd surveillance camera

At the end of May I bought a D-Link DCS-930/L WiFi home surveillance camera from Amazon (the actual provider was Eagle Shopper EU). With some difficulty I was able to install it (as described here) and access a view of home via my smartphone from anywhere with a net connection.

Emboldened by this I bought a second one a week ago, again from Amazon. In my fast, click-happy way, I failed to notice that the vendor had changed - it was now ShopCuscus. In fact when I opened the box a rather curious UK plug tumbled out, much less neat than the integrated plug of my first device.

Again I ran through the installation process: it all worked until the final stage, where I had to associate the camera with my existing D-Link account in the cloud (this is how you control the connection to the camera). The ShopCuscus Wizard refused to recognise my account.

After much messing around and attempts to re-install, I called D-link tech support. The guy suggested that the problem was the new supplier - perhaps it was an imported camera with a different spec? He suggested I wrap the camera up and send it back. I was unimpressed.

In the end I set up a second D-Link account with my backup email address and downloaded the (cheap) paid-for D-link Android app to conveniently access it. The free app is configured to access my original camera. It seems a lot of messing around to check that the cat hasn't died on us when we're on holiday!

The moral of this tale is two fold:

1. Always check that you buy stuff from one vendor, as system integration with multiple vendors is a nightmare.

2. The D-Link hardware is good, but the quality of the re-sellers' software is too brittle and unsophisticated. I think most of us believe we could program a module to link up correctly with a pre-existing D-link account - how hard can it be?

Saturday, June 08, 2013

A Raised Bed

Clare is at the cricket in Taunton today with my brother Adrian & family; we were left with an assignment: put a raised bed in the back garden. I had budgeted a couple of hours but in fact we have only just finished, five hours later. Alex, staying with us for a few days, has done the bulk of the spade-work.

The garden doesn't know what's about to hit it

Busy day

Hard at work

Mid way 

Job done

Wednesday, June 05, 2013

Google now wants to *understand* your queries

From Singularity Hub.
"In an interview with Singularity Hub, Ray Kurzweil provides an update about his first two months as Director of Engineering at Google. During the interview Kurzweil revealed that his team is collaborating with other groups at Google to enable computers to understand and speaking language just like humans. Kurzweil also tells us how Larry Page personally recruited him to join Google to pursue the goal of creating machines that can think and reason like the human brain.

Speaking with Singularity Hub Founder Keith Kleiner, Ray explained that ”My project is to get the Google computers to understand natural language, not just do search and answer questions based on links and words, but actually understand the semantic content. That’s feasible now.” To successfully do this will involve employing technologies that are already at Google like the Knowledge Graph, which has 700 million different concepts and billions of relationships between them. His team will also develop software as part of a system that will be “biological inspired” and can learn in a way analogous to the way the human brain is designed, that is, in a hierarchical structure."
Here's the interview (six minutes or so).


Kurzweil comes across as a nice guy, but judging from the reviews of his recent book, he is neither a tremendously deep thinker nor fantastically well-read in the sprawling field of AI. Still, Google has plenty of smart people to help him out.

Automated Natural Language Understanding Systems of human-equivalent ability currently don't exist and are astonishingly hard to design. Example: if you write a Google query:

"Why is the sky blue?"

Google today will search for web pages which have these words (or equivalent terms) closely spaced within their text and will then serve you a prioritised list. This is not understanding. To understand the query, Google would have to translate the query into an internal 'mentalese', something like

"Query(Reason(Colour(Sky,Blue)), Asker(<YOU>))"   *

and then know what to do with each of the emboldened words. Google therefore needs mini-theories for each of the concepts associated with them.

To answer the query, Google would have to have read the pages of the web (not a problem, it's already stored them) and translate those also into' mentalese'. Now it has to figure out how to use this mountain of unreliable and inconsistent conceptual information (theory piled upon theory) to answer your question.

Finally, Google really needs a theory of you. What did you intend by the question? Is it a physics answer you want and if so, how much science do you know already? Are you an artist - do you want a poetical answer? Are you a cultural historian - do you want to know the different explanations people have come up with. And so on.

If Google succeeded, it would be emulating a veritable army of call-centre workers, each of whom knew everything published on the Internet, and a lot about you personally. These are the 'guys' you'd be dealing with every time you pointed your browser/app at Google.

I would be impressed .. and a little nervous.

---

* A note for experts.


"Query(Reason(Colour(Sky,Blue)), Asker(<YOU>))"  seems like a relatively innocuous term in first-order predicate calculus (FOPC): nothing in fact could be further from the truth. FOPC is a highly-constrained declarative formal language much loved in AI because of its assumed tractability for automated theorem proving. Unfortunately it's a straitjacket when it comes to describing how humans linguistically interact.

"Query" is like a question-mark, semantically interpreted in the domain of Pragmatics (cf Speech-Act Theory). Pragmatics is founded upon agents with states of mind, beliefs and intentions - all completely absent from FOPC.

"Reason" is worth a Ph.D. thesis of its own. It's a cousin to the idea of "proof", formalised in metamathematics (cf Gödel's Incompleteness Theorem). Proofs (and reasons) look a little bit syntactic - formulae which justify other formulae via chains of inference. In fact the concept is clearly a semantic one (think of the way Standard ML manipulates proofs). There are some arguments omitted in the "Reason" term shown here, as all reasons start from some set of grounding assumptions - but what are they?

"Colour(Sky, Blue)" is a formula of FOPC but we need its denotation not to be TRUE or FALSE but, like Situation Semantics, to be a semantic object which connects the sky to a colour. Queries in general will require at least temporal, intentional and modal operators which are not present in FOPC.

<YOU> is a deictic signifier but that is the least of it: the reference is to an agent with a state of mind, namely you - with what you know and what you want clearly implicated. Another Ph.D. thesis in waiting.

To the Google team led by Ray Kurzweil I therefore commend Dorothy's famous remark: "Toto, I've a feeling we're not in Kansas any more."

Monday, June 03, 2013

One ton of gravel?

All those hours at the gym were not wasted. When you order a ton of gravel from your local building merchants it arrives in a mesh bag on a large lorry with a hydraulic crane-arm. They dump it at the bottom of your drive, so you can get your car in past it. The day advances into the afternoon heat and your wife gets her shovel and fills endless plastic buckets; you have the task of hauling those buckets two vertical metres and twenty horizontal ones around the house where they can be dumped on the old disreputable path. And eventually, after the pain, there is indeed gain.

Our previous path ...

... three-quarters of a ton of gravel later

Clare with her familiar
Clare was eager to share the news that we now live in an environment closer to being consistent with our own self-image. Her animal didn't much care one way or the other.

We're saving the last of the gravel for the raised bed (to come).

Sunday, June 02, 2013

Personality Disorders and Psychological Type (MBTI)

Many of us are 'on the spectrum' for some kind of 'personality disorder'; if you know your Myers-Briggs personality type (test here) you may recognise some pathological traits in yourself.

As an INTP I recognise a personal connection both with Schizoid personality disorder and the Asperger's syndrome spectrum (though I wouldn't say I'm clinical).

The following text is reprinted from here: a list of the symptoms of the ten most common personality disorders can be found here.
"Each type's dark side is occasionally manifested in personality disorders. Personality disorders, of which there are ten main types, consist of a series of symptoms which make it difficult to get along smoothly with others and adapt to society. Behaviours of those with such disorders are frequently irritating to people around them. When you learn about the 16 MBTI types it should make sense that some types are more prone to certain personality disorders than other types. Keep in mind that these are hypotheses and not based on any actual data.

Those who are paranoid generally believe that everyone is trying to harm them. This notion causes hostility, emotional detachment, and distrust of others. Such aversive behaviors are likely to be found in Introverted Thinkers. IxTx types are the most detached and wary; taken to the extreme, paranoia takes hold of their minds. [ISTJ, ISTP, INTJ, INTP].

Schizoid personality disorder is somewhat similar to the previous one. It entails a lack of willingness to engage in social interaction and emotional expression. Again, sounds like a fitting disorder for an IxTx. They appear indifferent to the outside world. But not only are they indifferent, they are unable to pick up on social cues. ISTxs, who are more observant than their iNtuitive counterparts, are often able to read nonverbal behavior. That leaves the schizoids with INTx. Schizoids resembles those with Asperger's syndrome, which contains mainly INTxs. [INTJ, INTP].

Next we'll talk about schizotypical people. There's only one type in particular that this personality disorder would affect. First of all, they have quite odd behavior, dress, beliefs, and perceptions. Combined with indifference to others, discomfort in close relationships, and stunted emotional expression, we're already at INTx. J or P? Well, schizotypical people often succumb to magical thinking, and they believe that symbolic messages are hidden just for them. This pattern of thought reflects Introverted iNtuition. [INTJ].

Antisocial personality disorder is the tendency to disregard safety, behave violently, break the law, and violate others' rights. Antisocial people have a general disregard for others, and they tend to lie and steal. This is clear xSTP behavior.  [ESTP, ISTP].

People who have borderline personality disorder are fundamentally different from what we have discussed so far. Instead of withdrawing sharply, they are often overly expressive. They fear being alone (E), have unstable moods and volatile relationships (F), and tend to be risky and impulsive (SP). This would suggest ESFP, but borderline people also exhibit suicidal behavior, an INFP trait. I suppose we can overlook this discrepancy, however, since those who are flawed in such a way may naturally consider suicide. [ESFP].

Histrionic personality disorder is like the one above. People with this disorder are excessively emotional and sensitive to what others say (F), constantly seeking attention (E), and concerned with their physical appearance (S). It follows that a histrionic person is more often than not an ESFx. [ESFJ, ESFP].

Narcissistic personality disorder is a condition in which one believes that they are superior to everyone else. They fantasize and exaggerate their abilities and self-worth (N), expect constant praise from others (E), and are insensitive to others' emotions (T). In reality, you'll probably find that the most arrogant people out there are ENTxs. [ENTJ, ENTP].

Those with avoidant personality disorder are much the opposite of the previous one. Their extreme shyness, timidity, and sensitivity combined with their social isolation and feelings of inadequacy indicates some variation of IxFx.   [ISFJ, ISFP, INFJ, INFP].

Next is dependent personality disorder, which, like schizotypical and borderline, mostly affects a single type. People with this condition behave submissively towards others, show a desire to be taken care of, tolerate abusive treatment, and feel the need to start a new relationship when one has ended. This closely resembles the negative part of the ISFJ profile.  [ISFJ].

Lastly, we'll take a look at obsessive compulsive personality disorder. These individuals are overly concerned with rules and orderliness, strive for perfectionism, are highly inflexible, and have a strong desire to be in control of situations. This description just screams xSTJ.  [ESTJ, ISTJ].

Types that may have a personality disorder:
INTJ (3), INTP (2), ISTP (2), ISTJ (2), ESFP (2), ISFJ (2), ESTP (1), ESFJ (1), ESTJ (1), ENTJ (1), ENTP (1), ISFP (1), INFJ (1), INFP (1)

Types not associated with a disorder: ENFJ, ENFP
As you can see, INTJ comes on top as being the type most likely to suffer from a personality disorder. And for some reason, neither of the Extraverted Idealists are particularly prone to any of the ten.

This, of course, raises some questions worth contemplating - what is it about the INTJ's thinking that makes them this way? What is so special about the ENFxs that they get to avoid these conditions?"