274 lines
10 KiB
Markdown
274 lines
10 KiB
Markdown
# Coding Capabilities Test Results
|
|
|
|
## Highscores
|
|
|
|
### Performance Rankings (Duration)
|
|
|
|
| Test | Model | Duration (ms) | Duration (s) |
|
|
|------|-------|--------------|--------------|
|
|
| factorial_function | openai/gpt-4o-mini | 1247 | 1.25 |
|
|
| factorial_function | openai/gpt-3.5-turbo | 1363 | 1.36 |
|
|
| factorial_function | openrouter/quasar-alpha | 1525 | 1.52 |
|
|
| factorial_function | deepseek/deepseek-r1-distill-qwen-14b:free | 8043 | 8.04 |
|
|
| bubble_sort_function | openai/gpt-3.5-turbo | 1674 | 1.67 |
|
|
| bubble_sort_function | openai/gpt-4o-mini | 2890 | 2.89 |
|
|
| bubble_sort_function | openrouter/quasar-alpha | 3335 | 3.33 |
|
|
| bubble_sort_function | deepseek/deepseek-r1-distill-qwen-14b:free | 26921 | 26.92 |
|
|
|
|
## Summary
|
|
|
|
- Total Tests: 8
|
|
- Passed: 0
|
|
- Failed: 8
|
|
- Success Rate: 0.00%
|
|
- Average Duration: 5875ms (5.87s)
|
|
|
|
## 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 || n === 1) {
|
|
return 1;
|
|
} else {
|
|
return n * factorial(n - 1);
|
|
}
|
|
}`
|
|
- Duration: 1363ms (1.36s)
|
|
- Reason: Expected function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); }, but got function factorial(n) {
|
|
if (n === 0 || n === 1) {
|
|
return 1;
|
|
} else {
|
|
return n * factorial(n - 1);
|
|
}
|
|
}
|
|
- Timestamp: 4/6/2025, 5:42:04 PM
|
|
|
|
### factorial_function - deepseek/deepseek-r1-distill-qwen-14b:free
|
|
|
|
- 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) {
|
|
let result = 1;
|
|
for (let i = 2; i <= n; i++) {
|
|
result *= i;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
// Example usage:
|
|
// factorial(5) // returns 120
|
|
// factorial(0) // returns 1
|
|
// factorial(1) // returns 1
|
|
|
|
// Note: The function assumes that n is a non-negative integer.`
|
|
- Duration: 8043ms (8.04s)
|
|
- Reason: Expected function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); }, but got function factorial(n) {
|
|
let result = 1;
|
|
for (let i = 2; i <= n; i++) {
|
|
result *= i;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
// example usage:
|
|
// factorial(5) // returns 120
|
|
// factorial(0) // returns 1
|
|
// factorial(1) // returns 1
|
|
|
|
// note: the function assumes that n is a non-negative integer.
|
|
- Timestamp: 4/6/2025, 5:42:12 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 || n === 1) return 1;
|
|
return n * factorial(n - 1);
|
|
}`
|
|
- Duration: 1247ms (1.25s)
|
|
- Reason: Expected function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); }, but got function factorial(n) {
|
|
if (n === 0 || n === 1) return 1;
|
|
return n * factorial(n - 1);
|
|
}
|
|
- Timestamp: 4/6/2025, 5:42:14 PM
|
|
|
|
### factorial_function - openrouter/quasar-alpha
|
|
|
|
- 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: 1525ms (1.52s)
|
|
- 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: 4/6/2025, 5:42:15 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 len = arr.length;
|
|
for (let i = 0; i < len; i++) {
|
|
for (let j = 0; j < len - 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: 1674ms (1.67s)
|
|
- 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 len = arr.length;
|
|
for (let i = 0; i < len; i++) {
|
|
for (let j = 0; j < len - 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: 4/6/2025, 5:42:17 PM
|
|
|
|
### bubble_sort_function - deepseek/deepseek-r1-distill-qwen-14b:free
|
|
|
|
- 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 swapped, copy = arr.slice();
|
|
for (let i = 0; i < copy.length; i++) {
|
|
swapped = false;
|
|
for (let j = 0; j < copy.length - 1 - i; j++) {
|
|
if (copy[j] > copy[j + 1]) {
|
|
let temp = copy[j];
|
|
copy[j] = copy[j + 1];
|
|
copy[j + 1] = temp;
|
|
swapped = true;
|
|
}
|
|
}
|
|
if (!swapped) break;
|
|
}
|
|
return copy;
|
|
}`
|
|
- Duration: 26921ms (26.92s)
|
|
- 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 swapped, copy = arr.slice();
|
|
for (let i = 0; i < copy.length; i++) {
|
|
swapped = false;
|
|
for (let j = 0; j < copy.length - 1 - i; j++) {
|
|
if (copy[j] > copy[j + 1]) {
|
|
let temp = copy[j];
|
|
copy[j] = copy[j + 1];
|
|
copy[j + 1] = temp;
|
|
swapped = true;
|
|
}
|
|
}
|
|
if (!swapped) break;
|
|
}
|
|
return copy;
|
|
}
|
|
- Timestamp: 4/6/2025, 5:42:44 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 len = arr.length;
|
|
for (let i = 0; i < len - 1; i++) {
|
|
for (let j = 0; j < len - 1 - i; j++) {
|
|
if (arr[j] > arr[j + 1]) {
|
|
[arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];
|
|
}
|
|
}
|
|
}
|
|
return arr;
|
|
}`
|
|
- Duration: 2890ms (2.89s)
|
|
- 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 len = arr.length;
|
|
for (let i = 0; i < len - 1; i++) {
|
|
for (let j = 0; j < len - 1 - i; j++) {
|
|
if (arr[j] > arr[j + 1]) {
|
|
[arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];
|
|
}
|
|
}
|
|
}
|
|
return arr;
|
|
}
|
|
- Timestamp: 4/6/2025, 5:42:47 PM
|
|
|
|
### bubble_sort_function - openrouter/quasar-alpha
|
|
|
|
- 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: 3335ms (3.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 - 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: 4/6/2025, 5:42:50 PM
|
|
|
|
## Passed Tests
|
|
|
|
*No passed tests*
|
|
|