Ex Machina (2014)

The movie is about AI and the old theme whether AI can feel or evoke feelings. Caleb (played by Domhnall Gleeson who was in Harry Potter one of the Wheasley brothers and is General Hux in new newer Star Wars), a programmer who is selected to participate in a ground breaking Turing test type experiment.
As pointed out in our AI and music experiment, the movie is an anti-thesis to the genesis. Instead of been born from the rib of Adam, the first women Eve stabs Nathan into the rib. Caleb at some points checks his rib whether he is human. In the end, not everybody is expelled from the paradise. Actually, it is much more brutal. Eve escapes from the paradise and Caleb (well, you have to see the movie).
There is a little bit of math. We cut out and glued together four short clips. In the first, we see Ava (played by Alicia Vikander who we know also as Lara Croft in Tomb Raider). In the second clip, Caleb talks to Nathan (played by Oscar Isaac, also well known from the Star Wars sequels) about the Turing test and about language abilities: ``the system is stochastic, mapping from internal semantic form to syntactic tree structure and then getting linearized words, ... " Some Python code with the Sieve of Eratosthenes appears in the third clip. The closing credits finally show some cool graph theory animations.

M4V, Ogg Webm. imdb link, Here is the page with the Sieve code (historically first way to compute primes). I translated the Python code essentially word by word into Mathematica. Obviously the movie writers found somewhere some code to write ISBN numbers:
             Do[ j=2*i; While[j<n+1,x[[j]]=0;j=j+i],{i,2,Floor[n/2]}]; x];
prime[n_,x_]:=Module[{i=1,j=1}, While[j<=n+1,If[x[[i]]==1,j++];i++];i-1];
prime[42,x] == Prime[42]    (* this is a test, both give 181     *)

code={1206,301,384,5}; key={1,1,2,2}; 
p = {73,83,66,78,32,61,32}; Map[FromCharacterCode,p]
(* gives   {I, S, B, N,  , =,  }

Do[ Print[prime[code[[i]],x]*key[[i]]],{i,4}]

(* gives      9781 1993 5314 22               *)

Oliver Knill, Posted April 1, 2020,