In order to use it,you need to know that it is not just a calculator. If
you grew up with slide rules, then the answer is probably good enough in
that instance. In my simple testing, it seems to only deal to the first
two dp's. e.g 0.69/0.26. (and until I asked for higher resolution, it
gave the correct answer to 2 dp. )
I'm hoping, that in later iterations, it will be able to test it's own
answers, but as is, it generally eventually gets to my desired result.
On 24/05/2023 18:26, Jordan Brown wrote:
On 5/23/2023 4:51 PM, Jordan Brown wrote:
Also, I don't know whether ChatGPT will ever get basic math wrong,
but it does get facts about the real world wrong
https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence),
so I would double-check anything that it says.
Rogier Wolff points out privately that ChatGPT does get basic math wrong.
https://medium.datadriveninvestor.com/i-found-a-simple-math-mistake-in-chatgpt-ac83a7994f10
Note that in the article ChatGPT blames its ~20% error on floating
point imprecision in Python. That's totally bogus.
I asked ChatGPT 3.5 the same question that the writer did, and it got
it closer, but still wrong by about 0.1%. It said
t ≈ (0.6931 / 0.2624) ≈ 2.639.
but it isn't; it's actually more than 2.641.
what is 0.6931 divided by 0.2624?
<<< 0.6931 divided by 0.2624 is approximately equal to 2.639.
Let's multiply both of them by 10,000.
What is 6931 divided by 2624?
<<< 6931 divided by 2624 is approximately equal to 2.64125.
This is pretty poor.
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
I use the version built into Bing, which is ChatGPT4 I believe and it is
much better.
0.6931 divided by 0.2624 is approximately 2.6413872
https://bing.com/search?q=0.6931+%2f+0.2624
On Thu, 25 May 2023 at 12:36, Raymond West raywest@raywest.com wrote:
In order to use it,you need to know that it is not just a calculator. If
you grew up with slide rules, then the answer is probably good enough in
that instance. In my simple testing, it seems to only deal to the first two
dp's. e.g 0.69/0.26. (and until I asked for higher resolution, it gave the
correct answer to 2 dp. )
I'm hoping, that in later iterations, it will be able to test it's own
answers, but as is, it generally eventually gets to my desired result.
On 24/05/2023 18:26, Jordan Brown wrote:
On 5/23/2023 4:51 PM, Jordan Brown wrote:
Also, I don't know whether ChatGPT will ever get basic math wrong, but it
does get facts about the real world wrong
https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence),
so I would double-check anything that it says.
Rogier Wolff points out privately that ChatGPT does get basic math wrong.
https://medium.datadriveninvestor.com/i-found-a-simple-math-mistake-in-chatgpt-ac83a7994f10
Note that in the article ChatGPT blames its ~20% error on floating point
imprecision in Python. That's totally bogus.
I asked ChatGPT 3.5 the same question that the writer did, and it got it
closer, but still wrong by about 0.1%. It said
t ≈ (0.6931 / 0.2624) ≈ 2.639.
but it isn't; it's actually more than 2.641.
what is 0.6931 divided by 0.2624?
<<< 0.6931 divided by 0.2624 is approximately equal to 2.639.
Let's multiply both of them by 10,000.
What is 6931 divided by 2624?
<<< 6931 divided by 2624 is approximately equal to 2.64125.
This is pretty poor.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
You're dead right there, wrt Bing. I'm getting it to write a pretty
comprehensive batch file, to process an openscad svg and generate a
specific version of g-code. It started off by saying it couldn't parse a
file, but it lied. It is taking a while, as I test each iteration, but
it will get there. The result will have plenty of room for improvement,
but It will work good enough.
On 25/05/2023 12:43, nop head wrote:
I use the version built into Bing, which is ChatGPT4 I believe and it
is much better.
0.6931 divided by 0.2624 is approximately 2.6413872
https://bing.com/search?q=0.6931+%2f+0.2624
On Thu, 25 May 2023 at 12:36, Raymond West raywest@raywest.com wrote:
In order to use it,you need to know that it is not just a
calculator. If you grew up with slide rules, then the answer is
probably good enough in that instance. In my simple testing, it
seems to only deal to the first two dp's. e.g 0.69/0.26. (and
until I asked for higher resolution, it gave the correct answer to
2 dp. )
I'm hoping, that in later iterations, it will be able to test it's
own answers, but as is, it generally eventually gets to my desired
result.
On 24/05/2023 18:26, Jordan Brown wrote:
On 5/23/2023 4:51 PM, Jordan Brown wrote:
Also, I don't know whether ChatGPT will ever get basic math
wrong, but it *does* get facts about the real world wrong
<https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence)>,
so I would double-check anything that it says.
Rogier Wolff points out privately that ChatGPT does get basic
math wrong.
https://medium.datadriveninvestor.com/i-found-a-simple-math-mistake-in-chatgpt-ac83a7994f10
Note that in the article ChatGPT blames its ~20% error on
floating point imprecision in Python. That's totally bogus.
I asked ChatGPT 3.5 the same question that the writer did, and it
got it closer, but still wrong by about 0.1%. It said
t ≈ (0.6931 / 0.2624) ≈ 2.639.
but it isn't; it's actually more than 2.641.
what is 0.6931 divided by 0.2624?
<<< 0.6931 divided by 0.2624 is approximately equal to 2.639.
Let's multiply both of them by 10,000.
What is 6931 divided by 2624?
<<< 6931 divided by 2624 is approximately equal to 2.64125.
This is pretty poor.
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org
I thought there may be some interest in how it was proceeding, following
on from a previous thread.
On 25/05/2023 19:14, Raymond West wrote:
You're dead right there, wrt Bing. I'm getting it to write a pretty
comprehensive batch file, to process an openscad svg and generate a
specific version of g-code. It started off by saying it couldn't parse
a file, but it lied. It is taking a while, as I test each iteration,
but it will get there. The result will have plenty of room for
improvement, but It will work good enough.
On 25/05/2023 12:43, nop head wrote:
I use the version built into Bing, which is ChatGPT4 I believe and it
is much better.
So far, managed to generate code to batch process an scad file, doing
various sections, and combining the SVG files. It is struggling with
converting the SVG to g code.
I've patiently gone through 33 iterations of trying the batch file
script generated by the AI (within Bing), and feeding back the errors or
results. It eventually seems to get into a loop, repeating previous guesses.
This is the input file (just one line)
M 10,-10 L 60,-10 L 60,-60 L 10,-60 z
The output that I want which should be
G01 Z-5
G01 X10 Y10
G01 X60 Y10
G01 X60 Y60
G01 X10 Y60
G00 Z2
I think the closest it has got is the following batch file
@echo off
setlocal enabledelayedexpansion
set "inputFile=input.txt"
set "outputFile=output.txt"
if exist "%outputFile%" del "%outputFile%"
for /f "usebackq delims=" %%a in ("%inputFile%") do (
set "line=%%a"
set "firstM=1"
for %%b in (!line!) do (
if "%%b" == "M" (
if "!firstM!" == "1" (
echo G01 Z-5 >> "%outputFile%"
set "firstM=0"
)
set coord=
) else if "%%b" == "L" (
echo !coord! >> "%outputFile%"
set coord=
) else if "%%b" == "z" (
echo !coord! >> "%outputFile%"
echo G00 Z2 >> "%outputFile%"
) else (
for /f "tokens=1,2 delims=," %%x in ("%%b") do (
set y=%%y
set /a y=-1*!y!
if not defined coord (
set coord=G01 X%%x Y!y!
)
)
)
)
if defined coord echo !coord! >> "%outputFile%"
)
endlocal
it does not show the Y values, although in earlier attempts it did, but
produced other errors.
Neat that you're making progress on this!
I approached it from a rather different perspective and instead used RapCAD for G-code generation:
https://github.com/WillAdams/gcodepreview
I've been documenting it at:
https://willadams.gitbook.io/design-into-3d/programming#gcodepreview
and have been using it inside OpenSCAD Graph Editor:
https://github.com/derkork/openscad-graph-editor
William
-----Original Message-----
From: Ray West raywest@raywest.com
To: OpenSCAD general discussion Discuss@lists.openscad.org
Sent: Sun, May 28, 2023 9:09 am
Subject: [OpenSCAD] OT openai/batch file/svg parse/gcode generate
I thought there may be some interest in how it was proceeding, following
on from a previous thread.
On 25/05/2023 19:14, Raymond West wrote:
You're dead right there, wrt Bing. I'm getting it to write a pretty
comprehensive batch file, to process an openscad svg and generate a
specific version of g-code. It started off by saying it couldn't parse
a file, but it lied. It is taking a while, as I test each iteration,
but it will get there. The result will have plenty of room for
improvement, but It will work good enough.
On 25/05/2023 12:43, nop head wrote:
I use the version built into Bing, which is ChatGPT4 I believe and it
is much better.
So far, managed to generate code to batch process an scad file, doing
various sections, and combining the SVG files. It is struggling with
converting the SVG to g code.
I've patiently gone through 33 iterations of trying the batch file
script generated by the AI (within Bing), and feeding back the errors or
results. It eventually seems to get into a loop, repeating previous guesses.
This is the input file (just one line)
M 10,-10 L 60,-10 L 60,-60 L 10,-60 z
The output that I want which should be
G01 Z-5
G01 X10 Y10
G01 X60 Y10
G01 X60 Y60
G01 X10 Y60
G00 Z2
I think the closest it has got is the following batch file
@echo off
setlocal enabledelayedexpansion
set "inputFile=input.txt"
set "outputFile=output.txt"
if exist "%outputFile%" del "%outputFile%"
for /f "usebackq delims=" %%a in ("%inputFile%") do (
set "line=%%a"
set "firstM=1"
for %%b in (!line!) do (
if "%%b" == "M" (
if "!firstM!" == "1" (
echo G01 Z-5 >> "%outputFile%"
set "firstM=0"
)
set coord=
) else if "%%b" == "L" (
echo !coord! >> "%outputFile%"
set coord=
) else if "%%b" == "z" (
echo !coord! >> "%outputFile%"
echo G00 Z2 >> "%outputFile%"
) else (
for /f "tokens=1,2 delims=," %%x in ("%%b") do (
set y=%%y
set /a y=-1*!y!
if not defined coord (
set coord=G01 X%%x Y!y!
)
)
)
)
if defined coord echo !coord! >> "%outputFile%"
)
endlocal
it does not show the Y values, although in earlier attempts it did, but
produced other errors.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org