Jump to content
IGNORED

Llama3 and Code Gen


Recommended Posts

 I played with it after watching the video posted in the Python thread, but I didn't want to hijack that thread. What might be most interesting was this answer, if it's true:

 

Quote
You
will you remember these corrections?
 
Meta AI
Yes, I will remember these corrections! I am designed to learn and improve from the conversations I have with users like you. The corrections you provided will be stored in my memory, and I will apply them to future conversations about TI BASIC programming on the TI-99/4A.
If you have any other corrections or tips, feel free to share them, and I will make sure to update my knowledge accordingly. My goal is to provide accurate and helpful responses to your questions, and I appreciate your help in achieving that goal!

Basically, I iterated with it till it created a TI BASIC program that should actually work.

 

This has potential - the system could gain experience from many people teaching it. But it's also highly probable that in many areas it will be taught garbage.

It would be interesting if someone else could try it - go to Meta.AI and ask for a program that moves an asterisk across the screen (I actually asked for a human, but it was struggling and kept wanting to use a predefined character) using TI BASIC for the TI-99/4A (you have to specify that, or it uses the calculator syntax). See if it gets it in one try or not.

 

10 REM MOVECHAR
20 X=1
30 PRINT TAB(X);"*"
40 X=X+1
50 IF X>28 THEN 60
55 GOTO 70
60 X=1
70 FOR DELAY=1 TO 50
80 NEXT DELAY
90 GOTO 30
100 END

 

This isn't a very interesting program, but it's correct and runs. We got there solely by my telling it how to fix errors in the generated code, took 10 iterations.

Edited by Tursi
  • Like 4
Link to comment
Share on other sites

Posted (edited)

It took significantly more tries to get SNAKE as in the video. This code works, but isn't perfect:

 

10 REM  SNAKE 
20 CALL CLEAR
30 X=10
40 Y=10
50 DX=1
60 DY=0
65 PX=X
66 PY=Y
70 CALL HCHAR(Y,X,64)
80 GOSUB 372
90 REM  MOVE SNAKE 
100 GOSUB 400
110 X=X+DX
120 Y=Y+DY
130 IF (X<1)+(X>28)+(Y<1)+(Y>12)THEN 380
140 CALL GCHAR(Y,X,C)
150 IF C<>ASC("O")THEN 160
151 GOSUB 372
160 CALL HCHAR(Y,X,64)
170 FOR DELAY=1 TO 50
180 NEXT DELAY
190 REM  HANDLE KEYS 
200 CALL KEY(0,K,S)
210 IF K=ASC("E")THEN 250
220 IF K=ASC("X")THEN 280
230 IF K=ASC("S")THEN 310
240 IF K=ASC("D")THEN 340
245 GOTO 100
250 DX=0
260 DY=-1
270 GOTO 100
280 DX=0
290 DY=1
300 GOTO 100
310 DX=-1
320 DY=0
330 GOTO 100
340 DX=1
350 DY=0
360 GOTO 100
370 REM  GENERATE FOOD 
372 FX=INT(RND*28)+1
374 FY=INT(RND*12)+1
376 IF (FX=X)*(FY=Y)THEN 372
378 CALL HCHAR(FY,FX,79)
379 RETURN
380 REM  END GAME 
382 PRINT "GAME OVER"
390 END
400 REM  SNAKE TRAIL 
410 CALL HCHAR(PY,PX,32)
420 PX=X
430 PY=Y
460 CALL HCHAR(PY,PX,45)
461 RETURN

 

Importantly the trail is only a single character long, so you can never hit yourself and you never grow. It required significant coaxing to make the keyboard and food work, to remember the limitations of IF..THEN, and repeatedly I had to call out specific line numbers in its own code. BUT it did better than ChatGPT did and I didn't WRITE any of this code.

 

(Oh, and for some reason it decided maximum row was 12... but that's good enough for today.)

 

Edited by Tursi
  • Like 8
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...