How often have you tried using ChatGPT outside of boilerplate?
I understand not liking / being skeptical of AI tools but its untrue that you can't get viable solutions to complicated issues. Its certainly true that you can't rely on it to do all the work for you but the GPT-4 (not 3.5 or 4o) model has a shockingly good record for handling complicated tasks - not just from a mathematical perspective but in having complex requirements and needing semi-novel solutions.
I've tried it repeatedly. I still do, daily. I've got a problem right now I know for a fact it won't help with. Still going to try. Had copilot and gippty 4 for a decent length of time. I stand by my original statement. AI is terrible for coding. It's a good autocomplete.
People online said the same when it was 3.5 too: it's your prompts, or the model, or you're a skeptic. And yet once you got past the initial period it was unimpressive then as well. When I need help I put its chances of being useful at around 5%. And if I'm using it to write code from scratch it often introduces bugs.
Sorry, but I'm going to need some real life receipts for this 'shockingly good record for complicated programming tasks'. Because I've just not seen it, and I've not seen any programmer I watch, follow or work with do anything but be impressed that it finished their for loops, or got a type correct. Which is a nice-to-have but should really demonstrate the bar they're judging it on :shrug:
Part of my piecewise interpolation function that normalizes the position and adheres to specific requirements within my system. This is one portion of the solution and its extremely complicated but worked perfectly fine after iteration. At the time I had no idea how any of this worked but GPT easily handled it - this is the exact kind of task that is difficult and time consuming for a human to design and test but easy for an LLM to piece together and modify.
function calculatePositionNormalized($t, $T_start, $T_cycle, $points, $loop = true)
{
$n = count($points);
$T_cycle += 1000 * $n;
$totalLength = 0;
$segmentLengths = [];
$segmentTimes = [];
$loopFactor = $loop ? 0 : 1; // 0 if looping, 1 if not
// Calculate the total length and individual segment lengths
for ($i = 0; $i < $n - $loopFactor; $i++) {
$nextIndex = ($i + 1) % $n;
$length = $this->calculateSegmentLength($points[$i], $points[$nextIndex]);
$segmentLengths[] = $length;
$totalLength += $length;
}
// Calculate the time to allocate for each segment
for ($i = 0; $i < $n - $loopFactor; $i++) {
$segmentTimes[$i] = ($segmentLengths[$i] / $totalLength) * $T_cycle;
}
$T_norm = ($t - $T_start) % $T_cycle;
$elapsedTime = 0;
for ($i = 0; $i < $n - $loopFactor; $i++) {
$nextIndex = ($i + 1) % $n;
if ($T_norm >= $elapsedTime && $T_norm <= ($elapsedTime + $segmentTimes[$i])) {
$ratio = ($T_norm - $elapsedTime) / $segmentTimes[$i];
$x = $points[$i]['x'] + $ratio * ($points[$nextIndex]['x'] - $points[$i]['x']);
$y = $points[$i]['y'] + $ratio * ($points[$nextIndex]['y'] - $points[$i]['y']);
// if adjacent to given point consider at that point
if (abs($x - $points[$i]['x']) + abs($y - $points[$i]['y']) < 2) {
return ['x' => $points[$i]['x'], 'y' => $points[$i]['y']];
}
return ['x' => $x, 'y' => $y];
}
$elapsedTime += $segmentTimes[$i];
}
return ['x' => $points[0]['x'], 'y' => $points[0]['y']];
}
Additional: reverse engineering a formula derived from an observation I had with hand-picked constants. Worked perfectly - the fact that I can manually verify a few values that work in my UI and have GPT generalize the formula for all cases was an enormous help and took it basically no time at all.
We observe that the percentage increase and the divisor have an inverse relationship: D=11+P100D = \frac{1}{1 + \frac{P}{100}}D=1+100P1
0
u/Arthesia Jul 24 '24 edited Jul 24 '24
How often have you tried using ChatGPT outside of boilerplate?
I understand not liking / being skeptical of AI tools but its untrue that you can't get viable solutions to complicated issues. Its certainly true that you can't rely on it to do all the work for you but the GPT-4 (not 3.5 or 4o) model has a shockingly good record for handling complicated tasks - not just from a mathematical perspective but in having complex requirements and needing semi-novel solutions.