142 lines
5.0 KiB
Markdown
142 lines
5.0 KiB
Markdown
# Coding Capabilities Test Results
|
|
|
|
## Highscores
|
|
|
|
### Performance Rankings (Duration)
|
|
|
|
| Test | Model | Duration (ms) | Duration (s) |
|
|
|------|-------|--------------|--------------|
|
|
| factorial_function | openai/gpt-4o-mini | 1450 | 1.45 |
|
|
| factorial_function | openai/gpt-3.5-turbo | 1504 | 1.50 |
|
|
| bubble_sort_function | openai/gpt-3.5-turbo | 1208 | 1.21 |
|
|
| bubble_sort_function | openai/gpt-4o-mini | 2334 | 2.33 |
|
|
|
|
## Summary
|
|
|
|
- Total Tests: 4
|
|
- Passed: 0
|
|
- Failed: 4
|
|
- Success Rate: 0.00%
|
|
- Average Duration: 1624ms (1.62s)
|
|
|
|
## Failed Tests
|
|
|
|
### factorial_function - openai/gpt-3.5-turbo
|
|
|
|
- Prompt: `Generate a JavaScript function that calculates the factorial of a number.
|
|
The function should be named 'factorial' and take one parameter 'n'.
|
|
Return only the function code, no explanation.`
|
|
- Expected: `function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); }`
|
|
- Actual: `function factorial(n) {
|
|
if (n === 0) {
|
|
return 1;
|
|
} else {
|
|
return n * factorial(n - 1);
|
|
}
|
|
}`
|
|
- Duration: 1504ms (1.50s)
|
|
- Reason: Expected function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); }, but got function factorial(n) {
|
|
if (n === 0) {
|
|
return 1;
|
|
} else {
|
|
return n * factorial(n - 1);
|
|
}
|
|
}
|
|
- Timestamp: 6/5/2025, 8:46:08 PM
|
|
|
|
### factorial_function - openai/gpt-4o-mini
|
|
|
|
- Prompt: `Generate a JavaScript function that calculates the factorial of a number.
|
|
The function should be named 'factorial' and take one parameter 'n'.
|
|
Return only the function code, no explanation.`
|
|
- Expected: `function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); }`
|
|
- Actual: `function factorial(n) {
|
|
if (n < 0) return undefined;
|
|
if (n === 0 || n === 1) return 1;
|
|
return n * factorial(n - 1);
|
|
}`
|
|
- Duration: 1450ms (1.45s)
|
|
- Reason: Expected function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); }, but got function factorial(n) {
|
|
if (n < 0) return undefined;
|
|
if (n === 0 || n === 1) return 1;
|
|
return n * factorial(n - 1);
|
|
}
|
|
- Timestamp: 6/5/2025, 8:46:09 PM
|
|
|
|
### bubble_sort_function - openai/gpt-3.5-turbo
|
|
|
|
- Prompt: `Generate a JavaScript function that implements bubble sort.
|
|
The function should be named 'bubbleSort' and take one parameter 'arr' (an array of numbers).
|
|
The function should return the sorted array.
|
|
Return only the function code, no explanation.`
|
|
- Expected: `function bubbleSort(arr) { const n = arr.length; for(let i = 0; i < n; i++) { for(let j = 0; j < n-i-1; j++) { if(arr[j] > arr[j+1]) { [arr[j], arr[j+1]] = [arr[j+1], arr[j]]; } } } return arr; }`
|
|
- Actual: `function bubbleSort(arr) {
|
|
let n = arr.length;
|
|
for (let i = 0; i < n - 1; i++) {
|
|
for (let j = 0; j < n - i - 1; j++) {
|
|
if (arr[j] > arr[j + 1]) {
|
|
let temp = arr[j];
|
|
arr[j] = arr[j + 1];
|
|
arr[j + 1] = temp;
|
|
}
|
|
}
|
|
}
|
|
return arr;
|
|
}`
|
|
- Duration: 1208ms (1.21s)
|
|
- Reason: Expected function bubbleSort(arr) { const n = arr.length; for(let i = 0; i < n; i++) { for(let j = 0; j < n-i-1; j++) { if(arr[j] > arr[j+1]) { [arr[j], arr[j+1]] = [arr[j+1], arr[j]]; } } } return arr; }, but got function bubblesort(arr) {
|
|
let n = arr.length;
|
|
for (let i = 0; i < n - 1; i++) {
|
|
for (let j = 0; j < n - i - 1; j++) {
|
|
if (arr[j] > arr[j + 1]) {
|
|
let temp = arr[j];
|
|
arr[j] = arr[j + 1];
|
|
arr[j + 1] = temp;
|
|
}
|
|
}
|
|
}
|
|
return arr;
|
|
}
|
|
- Timestamp: 6/5/2025, 8:46:10 PM
|
|
|
|
### bubble_sort_function - openai/gpt-4o-mini
|
|
|
|
- Prompt: `Generate a JavaScript function that implements bubble sort.
|
|
The function should be named 'bubbleSort' and take one parameter 'arr' (an array of numbers).
|
|
The function should return the sorted array.
|
|
Return only the function code, no explanation.`
|
|
- Expected: `function bubbleSort(arr) { const n = arr.length; for(let i = 0; i < n; i++) { for(let j = 0; j < n-i-1; j++) { if(arr[j] > arr[j+1]) { [arr[j], arr[j+1]] = [arr[j+1], arr[j]]; } } } return arr; }`
|
|
- Actual: `function bubbleSort(arr) {
|
|
let n = arr.length;
|
|
for (let i = 0; i < n - 1; i++) {
|
|
for (let j = 0; j < n - 1 - i; j++) {
|
|
if (arr[j] > arr[j + 1]) {
|
|
let temp = arr[j];
|
|
arr[j] = arr[j + 1];
|
|
arr[j + 1] = temp;
|
|
}
|
|
}
|
|
}
|
|
return arr;
|
|
}`
|
|
- Duration: 2334ms (2.33s)
|
|
- Reason: Expected function bubbleSort(arr) { const n = arr.length; for(let i = 0; i < n; i++) { for(let j = 0; j < n-i-1; j++) { if(arr[j] > arr[j+1]) { [arr[j], arr[j+1]] = [arr[j+1], arr[j]]; } } } return arr; }, but got function bubblesort(arr) {
|
|
let n = arr.length;
|
|
for (let i = 0; i < n - 1; i++) {
|
|
for (let j = 0; j < n - 1 - i; j++) {
|
|
if (arr[j] > arr[j + 1]) {
|
|
let temp = arr[j];
|
|
arr[j] = arr[j + 1];
|
|
arr[j + 1] = temp;
|
|
}
|
|
}
|
|
}
|
|
return arr;
|
|
}
|
|
- Timestamp: 6/5/2025, 8:46:13 PM
|
|
|
|
## Passed Tests
|
|
|
|
*No passed tests*
|
|
|