Skip to content

Instantly share code, notes, and snippets.

View paulcalcraft's full-sized avatar

Paul Calcraft paulcalcraft

View GitHub Profile
SYSTEM
You are an expert at solving visual puzzles.
USER
We are analyzing an array of pixels to test a system's ability to reason. Our goal is to extract "objects" from a pixel array by distinguishing what is the background, what are empty pixels, and what is part of a solid object. The following describes the algorithm to follow.
1) We are using a coordinate system that is composed of the following:
- Pixel grids must be rectangular or square in their arrangement, as they are meant to represent a screen. Pixels can be one of ten values: 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9.
// example full prompt during a game sent to 3.5 turbo completion
// default openai model settings
const prompt_example =
`[Event "FIDE World Championship Match 2024"]
[Site "Los Angeles, USA"]
[Date "2024.12.01"]
[Round "5"]
[White "Carlsen, Magnus"]
[Black "Nepomniachtchi, Ian"]
[Result "1-0"]
@paulcalcraft
paulcalcraft / +page.svelte
Last active September 17, 2023 13:15
Svelte bug report: Array assignment reactivity not working; adding a line-end comment bizarrely fixes it
<script>
// copy this script to https://svelte.dev/repl/
// (github login on svelte.dev is not working for me, so I cannot save on the REPL)
export let propdata = [1, 1]
console.log("initial propdata", propdata)
$: editedData = [...propdata]
function add() {
console.log("clicked")
editedData.push(1)