Showing posts with label Bob. Show all posts
Showing posts with label Bob. Show all posts

Friday, January 19, 2024

Lust and Pain in the Palace of Lies


From OpenArt

I wrote this 2,000 word short story as a dark satire on mysterious government agencies whose optimal recruits are those with Dissociative Identity Disorder. Think unempathic, callous, impervious to pain, low arousal - yet also competent, smart and on-mission.

We follow the final (virtual reality) assessment of such a trainee. I was trying for psychological horror, penetrating such a state of mind and a twist. I was also very interested to see whether the current batch of LLM AIs could add some value to my draft.

Here was the prompt: Please edit and improve the short story I will present in the next post. Keep the length about the same but improve the literary quality. Also accentuate, if possible, the haunting psychological dissociation, depersonalization and derealisation experienced by the protagonist.

Bard flatly refused to consider it. Its neo-Victorian guardrails simply blew a fuse - I suspect the title was enough. Booksie’s Bob was made of sterner stuff and produced a version which was 25% shorter, mostly by bowdlerising the material and failing to grasp the centrality and ambiguity of the protagonist’s psychological reality and the VR setting. Some of the detailed descriptive material was valuable, however, so I revised and incorporated that into the final version here (two or three paragraphs, including the first and last).

My conclusion. The current public AIs are ring-fenced against adult material, whether sexually somewhat-explicit or featuring scenes of torture or horror, even if implicit. They do not comprehend the overall plot, particularly if it’s sophisticated, ambiguous or setting up a twist. However, like a super-thesaurus, the AI-edited version is currently useful for feedback and detail. Might work better for children’s stories if they were bland and uplifting (!).

But things will only get better.

My domestic critic, who read both versions, said that she didn’t like my story: “Why do you never write about nice people doing nice things?” she said.

Next time, I told her.

Here's a link to the story.

Sunday, October 16, 2016

The Bitcoin Transaction Process Model

The process of setting up and validating a Bitcoin transaction is complex and seems under-explained in the literature. For what it's worth, here is my own attempt to figure it out.

Some caveats. I have oversimplified, not taking account of transaction fees. I have not tried to be faithful to the syntactic format of a transaction; I'm after maximum conceptual clarity.

As is traditional, Alice is going to pay Bob 12 milliBitcoins, which I estimate today is worth £6.36.

The idea of Bitcoin is that everything is transactions. For Alice to pay Bob, someone else must have already paid her. I'm going to make it real easy and assume Alice has already received a single payment (from someone else) of 12 mBTC - this is called an 'unspent transaction output - UTXO', and she is merely going to 'pass along' that 12 mBTC to Bob.

---


This is how Alice got her 12 milliBitcoins

The transaction I'm calling TX: Pre was set up by someone else to pay Alice 12 mBTC. The payment was to Alice's Bitcoin address, a designator (like a bank account), which was constructed by hashing one of Alice's Public Keys and encoding it into an alphanumeric format (Base58). There are no security issues here, Alice published this Bitcoin address freely to accept payments. It all worked.

---


Alice constructs a transaction to pay Bob 12 mBTC

So TX: A2B (my name for the purposes of this post, not a Bitcoin term) is a new transaction. Alice (Alice's wallet software in fact) first inserts a pointer to TX: Pre, to its location on the public Blockchain - recall this is the source of Alice's 12 mBTC.

Secondly, she combines (most of) the fields in TX: Pre along with Bob's Bitcoin address to produce a hash code. This is then encrypted with her Private Key (corresponding to the already mentioned Public Key) to produce a digital signature. Only Alice can produce this digital signature as only Alice knows her own secret private key.

She then adds Bob's Bitcoin address as the destination, the amount of 12 mBTC to pay, and some other stuff (of course!) and the transaction is now ready to be launched onto the Bitcoin peer-to-peer network. Every node that receives it will check the transaction for validity (there are many checks in fact).

---

How can the Bitcoin network ensure Alice is the only one who can spend that 12 mBTC on prominent public display on the Blockchain as TX: Pre? Note that like all transactions on the Blockchain, TX: Pre is read only and cannot be altered. To do so would constitute a successful attack on the Blockchain - the 'confirmations' mechanism is one way this risk is mitigated.




The transaction validation  process model (carried out by all full nodes) 

A validating node (including Bob, who has perhaps the greatest interest in determining that Alice is legitimately able to pay him) first repeats Alice's hash.

TX: A2B has a pointer to TX: Pre so this can be retrieved from the public Blockchain and concatenated with Bob's Bitcoin address which is stored in the 'output locking script' part of TX: A2B. So these two items of data are hashed.

At the same time, Alice's public key (in the 'input unlocking script' of TX: A2B) is used to decrypt Alice's digital signature, uncovering Alice's original hash. If the two hashes are equal, this proves that Alice originated this transaction.

We finally make sure that Alice's Public Key (which we know to be valid because it unlocked Alice's digital signature) matches Alice's Bitcoin address (the latter is a hash of the former) from TX: Pre. Once this is done we are assured that the Alice who was the recipient of 12 mBTC in TX: Pre is the same Alice as the one who has originated (and signed) TX: A2B.

Bob can breathe a sigh of relief.

Note that formally, the above validation procedure is a concatenation of the 'input unlocking script' from TX: A2B and the 'output locking script' from TX: Pre.

And once TX: A2B has been lodged on the public Blockchain, transaction TX: Pre will be 'chained' to it, so will now be considered 'spent'. No-one else can spend it.

---

If anyone sees an error in this account which is more than just sloppy over-simplification, I'd be grateful if you could put something in the comments and I will fix it.

You may also be interested in my review of "Mastering Bitcoin: Unlocking Digital Cryptocurrencies" by Andreas M. Antonopoulos, and the diagram (from Satoshi Nakamoto's original paper) there.

Monday, April 04, 2016

The Amazon parcel problem

Alice and Bob are both signed up to Amazon Prime and each is expecting a parcel to be delivered to their respective apartment the very next day. The Amazon delivery person will arrive sometime in the ten hours from 9 am to 7 pm, but there's no more definite information. Let's say delivery has a uniform probability distribution.

Both Alice and Bob plan to be at home to collect the parcel, but each also wants to spend an hour in the bath from where, unfortunately, you can't answer the door.

Alice says,
"The chances of the Amazon guy turning up in any of the 10 hour-long slots is exactly the same. It therefore doesn't matter when I take my bath, I always have just a 1 in 10 chance of missing the parcel."
Bob says,
"I'll be taking my bath at 9 am. If I do that I've got a 9 in 10 chance of the Amazon guy coming later than that.

"But suppose I'm stupid enough to delay the bath till, say, 5 pm. Sure if the guy already came, I'm good. But assuming the parcel hasn't yet arrived, there's now a 50% chance I'll be in the bath when it arrives. I'd be insane to bathe then.

"It's always better to take a bath early when an Amazon parcel is due."
Who's right?

---

Update: (Tuesday, 5th April, 2.15 pm).

I'm  more interested in why Bob's argument might ever be considered psychologically plausible.

Let's say we get to 2 pm and the Amazon guy hasn't come. Then the probability per hour of the parcel arriving in the next five hours has doubled from 10% to 20%.

Definitely riskier to take that bath!

This assumes that Bob forgets the (on average) half the days that the parcel did in fact come earlier - he collected it or it arrived between 9am and 10am and he missed it, being in his bath.

But people have a past-future asymmetry; they forget the past but worry about the future. Early deliveries don't give much cause for worry; late deliveries generate increasing anxiety as the day progresses.

People remember things like that - the late days come to predominate in memory. And they have the higher per-hour probability distribution for when the parcel will eventually be delivered.

'Best to bathe earlier'.