When playing the game Universal Paperclips copy and paste this code in your browser to automatically trigger the quantum computer button when it would yield a compute benefit.
Created
December 16, 2021 21:44
-
-
Save bricef/3815a7f528dc1c347446421bcd601f14 to your computer and use it in GitHub Desktop.
Universal Paperclip quantum computing helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let btn = document.getElementById('btnQcompute') | |
let chips = Array.from(document.getElementsByClassName('qChip')) | |
let interval = setInterval(()=>{ | |
let t = chips.map(c => c.style.opacity).map(parseFloat).reduce( (x,y) => x+y ); | |
if (t > 0){ | |
btn.click() | |
} | |
}, 10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment