Dopamine as temporal difference errors !! 🤯

I expect I’m sharing a dopamine burst that I experienced! 🤓 I’m listening to The Alignment Problem by Brian Christian 📚 and it’s explaining how Dayan, Montague, and Sejnowski* connected Wolfram Schultz’s work to the Temporal Difference algorithm (iirc that’s, of course!, from Sutton and Barto). A quick search returns these to add to my maybe reading list: Dopamine and Temporal Differences Learning (Montague, Dayan & Sejnowski, 1996) Dopamine and temporal difference learning: A fruitful relationship between neuroscience and AI (Deepmind 2020)

Continue reading →

It is possible for dopamine to write cheques that the environment cannot cash. At which point the value function must come back down.

Nice lunch time walk into the village

Nice summary and stark reminder of what’s happening right now.

Only CEOs are making the decisions… they have a vested interest.

Worth keeping in mind it’s not just computing but robotics that are progressing.

Stuart Russel at the World Knowledge Forum 2024

Stuart Russel on Wikipedia

[video] Crew.ai experiment with Cyber Threat Intelligence

Continue reading →

Agentic behaviours

My initial thoughts, expressed via the medium of sport, on agentic behaviours plus friends view, which I think is better (expected as he’s the Basketball player). Jackson is the ethical agent. Pippen is the organizing agent. Harper is the redundant agent. Note: since looking into this I’m not sure agentic is the right term, now thinking of them as simply components of a system.

Continue reading →

[short] Why use tools with an LLM?

Continue reading →

[short] AI Systems

Continue reading →

Project Euler meets Powershell - Problem #4

<# A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. #> # 998001 - so what's the largest palindrome number less than this one - then check if it's a product of 3-digit numbers function ispalindrome { [cmdletbinding()] param( [int] $number ) process{ $digits = @() $next_int = $number while ($next_int -gt 9) { $digit = $next_int % 10 $digits = $digits + $digit $next_int = ($next_int / 10) - (($next_int % 10)/10) #(99099 / 10) - ((99099 % 10)/10) } $digits = $digits + $next_int #$digits #$digits.

Continue reading →

Project Euler meets Powershell - reworking factorial to avoid PowerShell 1000 recursions limit

Turns out it was the recursion the factorial function - I’ve reworked it to use a for loop function factorial { [cmdletbinding()] param($x) if ($x -lt 1) { return "Has to be on a positive integer" } Write-Verbose "Input is $x" $fact = 1 for ($i = $x; $i -igt 0; $i -= 1){ #Write-verbose "i: $i" $fact = [System.Numerics.BigInteger]::Multiply($i , $fact) } Write-Verbose "i equals $i" $fact } it’s still running for factorial 486847…

Continue reading →

Project Euler meets Powershell - Problem #3

amonkeyseulersolutions: I’ve read that an integer p > 1 is prime if and only if the factorial (p - 1)! + 1 is divisible by p. So I’ve written this: Read More Here’s the fixed version… function isprime { [cmdletbinding()] param($x) if ($x -lt 1) { return "Has to be on a positive integer" } # An integer p > 1 is prime if and only if the factorial (p - 1)!

Continue reading →

Project Euler meets Powershell - largest prime factor of a value?

things to do… No more than the square root of the value. test each value? start from the square root and work down. the first one is the largest…

Continue reading →

Project Euler meets Powershell - isprime

I’ve read that an integer p > 1 is prime if and only if the factorial (p - 1)! + 1 is divisible by p. So I’ve written this: function isprime { [cmdletbinding()] param([int] $x) if ($x -lt 1) { return "Has to be on a positive integer" } # An integer p > 1 is prime if and only if the factorial (p - 1)! + 1 is divisible by p [int] $factorial = factorial ($x-1) Write-Verbose "Factorial: $factorial" $remainder = ($factorial + 1) % $x Write-Verbose "Remainder: $remainder" if ($remainder -eq 0) { return $true } else { return $false } } Unfortunately it doesn’t work for some numbers known to be prime - 29 is the example I have…

Continue reading →

Project Euler meets Powershell - factorial...

function factorial { [cmdletbinding()] param([int64] $x) if ($x -lt 1) { return "Has to be on a positive integer" } if ($x -eq 1) { [int64] $x } else { [int64] $x * (factorial ($x-1)) } }

Continue reading →

Project Euler - Problem 2

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, … By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. function fib { [cmdletbinding()] param ( [int] $x ) process { if ($x -lt 2) { $x } else { $n1 = $x - 1 $n2 = $x - 2 $fib2 = fib $n2 $fib1 = fib $n1 $result = $fib1 + $fib2 #Write-Verbose $result $result } } } #fib 5 -Verbose Write-Host "___________-------------______________" $ScriptStartTime = date for ($i = 0; $fib -lt 4000000 ; $i+=1) { $fib = fib $i Write-Host -ForegroundColor Magenta "fib = $fib" If ($fib % 2 -eq 0 ) { $sum += $fib Write-Host -ForegroundColor Green "sum = $sum" } } $ScriptEndTime = date $ScriptDuration = $ScriptEndTime - $ScriptStartTime Write-Host "`n Time Taken:" + $ScriptDuration

Continue reading →

Project Euler meets Powershell - Problem 1

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. Solution to Euler’s Problem #1 for ($i = 1; $i -lt 1000; $i += 1) {if ( ($i % 3 -eq 0) -or ($i % 5 -eq 0) ) { $count += $i } };$count

Continue reading →