3 ms·
Just did a comparison of Bard vs GPT-4 with a coding question I came up with: > I have a 3 dimensional black bitmap (voxel map) with a white straight line draw
by londons_explore 4y ago
Just did a comparison of Bard vs GPT-4 with a coding question I came up with:
> I have a 3 dimensional black bitmap (voxel map) with a white straight line drawn in it. The 3d bitmap is saved as a bunch of tiff files by layer eg. layer_347.tif Write me python code to load this data and return the x,y,z location of each end of the line. The bitmap is too big to load all of it into RAM at once. Use a binary search to avoid loading unnecessary files.
Bard came up with a solution which was close but didn't follow the instructions (it just loaded all the data). It also assumed layer_9 sorted before layer_10.
GPT-4 came up with a solution which followed the instructions, but had a buggy binary search implementation, and a suboptimal O(n).
The GPT-4 solution was closer to what I was after, but there wasn't much in it. Neither implementation handled edge cases like missing files or had tests or anything.
- belltaco 4y ago> Neither implementation handled edge cases like missing files or had tests or anything. Did you tell them to do those things after they came up with the solution?
- ThalesX 4y agoI'm sorry for the confusion. Here's a version that handles edge cases: ``` // Basically still not handling edge cases ```