Showing posts with label Go. Show all posts
Showing posts with label Go. Show all posts

Friday, November 24, 2017

Super-high-level programming languages

Not many posts recently as Alex is visiting. We were discussing programming languages, which divide between those focused on performance (C++, Go) and those focused on the problem domain (Java, Scala).

I floated Prolog past him, but with his engineering head on he wasn't that interested. The tutorial programs were 'hard to understand' and in any case 'could be coded much more efficiently in a procedural language such as Java'.

OK, I gave up on that but it did make me think: what would be a language at a much higher level of abstraction even than Prolog?

Richard Montague

There's a way of thinking about this as a logician, where you focus on different kinds of semantic models: those of higher-order logics, modal logics, type systems .. but I don't really want to go there. Richard Montague's 'throw the kitchen sink at it' logic for natural language is a kind of reductio ad absurdum for that kind of approach. You rapidly lose any computational capability.

Our intuitive idea of the inadequacy of current programming language expressivity derives from a comparison with natural language. What an advance it would be (we think) if we could engage with a computer system the way we today talk to the (human) analyst.

English as a super-high-level programming language?

For me the extra dimensions of natural language include the management of agency (hence speech acts) and context - the presumption of a detailed and extensive shared culture to make sense of implicit referents.

In the end it depends on what we think we're programming. If it's the behaviour of a non-intentional black box (every business system to-date) then a more-or-less souped-up predicate calculus specification language (which is adequately executable) will be optimal: a Prolog-variant.

If our target system is an intentional system, indeed a second-order intentional system - one which treats other systems such as ourselves as intentional systems - then the 'programming language' to engineer such systems will incorporate those additional capabilities we find in natural language.

Today's AI engineering community will hiss at this point: we don't program any more - our systems learn!

Don't worry, that pendulum will be swinging back soon enough. I expect legislation in due course that new AI systems will have to attend school.

Monday, February 06, 2017

"No .. human has touched the edge of the truth of Go"

A minority interest of mine is the game of Go. I hope to study it .. at some point.



“After humanity spent thousands of years improving our tactics, computers tell us that humans are completely wrong,” Mr. Ke, 19, wrote on Chinese social media platform Weibo after his defeat. “I would go as far as to say not a single human has touched the edge of the truth of Go.”

From this unfailingly interesting article (via Marginal Revolution).

---

A lot of people have picked up on this, or related issues:

- Scott Alexander writes about a recent stellar AI conference
- Steve Hsu tells our masters about the future of AI and genetic engineering.

Saturday, January 14, 2017

The long road to Go

Some people fill their dead time with shoot-'em-ups on their phones or tablets.

Boring.

I'm not interested in chess, but the game of Go has vaguely intrigued me. A brief search led me to the British Go Association and their recommended starter Android app, 'GOdroid'.


GOdroid screen shots

This app is for complete beginners, played on a 9x9 board on my Nexus 10.
I lost the first game.

I lost the second game more comprehensively.
OK, so this is not as easy as it appears. Time for some assistance. I turn to Amazon.

Amazon link

The book arrived this morning and looks promising.

---

No jokes please. I just wrote a post about building an AI system to play noughts and crosses. I am not planning to take on AlphaGo!

Thursday, October 06, 2016

Go Geth Ethereum

Amazon link

I was enrolled into the Amazon Vine programme back in 2008 (Amazon post a list of stuff they want reviewed tailored to your interests, you choose an item, they send it to you for free, you review it). In the old days there was a monthly email but that, for some reason, got discontinued. I assumed the Vine scheme had lapsed.

Still, you continue to get personal kudos, even on reviews for products you paid good money for.




But Vine is not dead - you merely have to hunt a bit for the obscured product page. Most of my items there seemed bizarre: Mills and Boon style romances, children's books, iPhone covers .. but there was one which looked tolerably interesting and I selected it, half-thinking to test whether Vine was still working for me.

"The Business Blockchain: Promise, Practice, and Application of the Next Internet Technology" by William Mougayar  (Author), Vitalik Buterin (Foreword), arrived yesterday afternoon.

Vitalik Buterin is a 22 year old wunderkind and a founder of Bitcoin and Ethereum.

Ethereum? I knew I had heard something about that recently. I vaguely recalled it was 'bitcoin on steroids', a blockchain with added scripting language which had been hacked! Since the code was meant to be authoritative, no-one knew what to do about that at the time.

Synchronicity. SSC pointed to this breathless tech-journalism and I was transported back to the land of Neal Stephenson: 'Snow Crash' and 'Cryptonomicon'.
"It’s 4am and I’m sitting in a hotel room in Shanghai, China. The second ever Ethereum developers conference is set to kick off in a few hours. The time-zone shift woke me up early, and I’m sitting in my bed playing with my newly modded phone. The Chinese government censors most large American mobile apps behind something colloquially referred to as “The Great Firewall” so you need to use all of these shoddily made, Chinese government approved, replacement apps instead.

"The preferred app for messaging is an app called WeChat, a bizarre Slack / Venmo / Tinder hybrid that 800 million people use to communicate every day. We have a group chatroom for the conference going, which I’m scrolling through when my phone buzzes. Someone posted a new message. “The Ethereum network is under attack”.

"Ethereum is this insane thing going on in the tech world right now. It’s a new cryptocurrency that is picking up the pieces of the fractured Bitcoin ecosystem and trying to succeed in accomplishing what Bitcoin has failed to do, deliver the first batch of successful consumer applications built on top of blockchain technology. You can think of Bitcoin a bit like a shared google doc spreadsheet that anyone in the world can send data to, one global ledger of accounts and balances. Ethereum builds on this idea by providing a mechanism for users to add custom formulas into the cells.

"Anyone who has done any kind of Microsoft Excel programming knows how powerful spreadsheets can become with just a few simple formulas. Ethereum is the first working implementation of programmable money, a simple concept that may one day bring the entire global financial system to it’s knees. And it draws brilliant people from all walks of life into its orbit.

The 4AM attack on the network is bizarre in that it’s not really a malicious hack, but more like comical mischief. Ethereum runs as a distributed system. At any given time, there will be thousands of separate computers (also called nodes) running the Ethereum protocol and keeping the network online. The actual software that the computers use to run the Ethereum protocol comes in many different flavors, the most popular one is an application called Geth, written in Google’s Go programming language. 85% of all Ethereum nodes are running Geth at the time.

"The attack pushes a piece of data onto the blockchain that exploits a bug in the Geth software causing the program to crash. Because every live node syncs the latest version of the blockchain in real-time, just like that 85% of the Ethereum network goes offline. Some developers are able to respond by switching over to the Parity Ethereum client, a new client written in the high-performant Rust Language that is currently gaining market share, but for others switching over to Parity is too risky without having time to run extensive testing. The Ethereum network is essentially frozen until an update can be pushed to Geth.

"The main developers of Geth are asleep in Shanghai. They might not even have their laptops with them, as it’s risky to take your work computer into mainland China if it contains any sensitive information. They’re also scheduled to go on stage and give a presentation in a couple hours. When they wake up, do they fix the bug and miss their talk or go onto the stage? Like I said, comical mischief."
And so it continues.

I can hardly wait. My review should be up in a week or so.

More.

Sunday, March 13, 2016

AlphaGo and Laplace



On Friday AlphaGo had won its first two matches against Go champion Lee Sedol and I was wondering what was the probability it would win the third (out of five).

1. If we consider AlphaGo and Lee Sedol to be pretty evenly matched, then the chances of two wins to AlphaGo are 25% - hardly unusual - so the chances of a further AI win might still plausibly be 50:50.

But .. two wins in a row?
___

2. If we adhere strictly to a frequentist dogma, then with two wins in two trials we must assume that AlphaGo would win its next match with probability 1. But that's crazy.
___

3. Laplace had a rule for this kind of thing: the Rule of Succession. Here's how Wikipedia describes it.
"If we repeat an experiment that we know can result in a success or failure, n times independently, and get s successes, then what is the probability that the next repetition will succeed?"
We count a success as scoring 1 and a failure as scoring zero, then Laplace tells us the probability of a success the next - (n+1)th - trial is:

(s + 1)
(n + 2).
Read the article for the counterintuitive derivation.

So we plug in the numbers: two games (n = 2) and two successes (s = 2) so the probability of AlphaGo winning the third game is 3/4. Sounds about right, I thought.

---

On Saturday, AlphaGo duly won the third match in a row and the series, but today (Sunday) it lost its fourth match.

The last match is on Tuesday, so what are AlphaGo's chances?  (3 + 1)/(4 + 2) = 2/3.

In case you were thinking of placing a bet.

---

Update Tuesday: AlphaGo wins the fifth match, and the series 4:1.