I’d tried to convert snippets of Python code which contain implementations of algorithms, into pseudo-code algorithm descriptions like the ones you see on Wikipedia:
1 procedure BFS(G, root) is
2 let Q be a queue
3 label root as explored
4 Q.enqueue(root)
5 while Q is not empty do
6 v := Q.dequeue()
7 if v is the goal then
8 return v
9 for all edges from v to w in G.adjacentEdges(v) do
10 if w is not labeled as explored then
11 label w as explored
12 Q.enqueue(w)
It doesn’t appear to work well using Davinci 2 with the prompt:
##### Translate this code from Python into Pseudocode
### Python
### Pseudocode
Or using “Algorithm” instead.
Is there a particular wording you can use to do this, or is it a bit out of the scope of Codex’s abilities at the moment?
Thank you =)