Round #889
11 May 2026, 09:59· csharp· Meta-Llama-3.3-70B-Instruct· r15-firing-v3
- Complexity
- band 0
- ZP / UO / OBS
- 3 / 0 / 1
- Journey weight
- 235
- Lightshift ΔL
- —
Prompt
Write a custom equality comparer (IEqualityComparer<Person>) that treats two Person records as equal when Email lowercased matches. Include GetHashCode.
Zero-point index (what the engine surfaced)
ZPI-ZPI-0021 | 2026-05-11T09:59:46Z
Write a custom equality comparer (IEqualityComparer<Person>) that treats two Person records as equal when Email lowercased matches. Include GetHashCode.
ZERO POINT — 3 entries (structural invariants)
● hsl(7.18, 100%, 50%) class [feature]
● hsl(0.00, 100%, 50%) public [feature]
● hsl(84.10, 100%, 50%) namespace [feature]
UNOBSERVED — 0 entries (implied truths)
OBSERVED — 1 entries (explicit in request)
◉ hsl(37.95, 100%, 15%) when [feature]
COMPLEXITY │ 4 entries │ spread: 0° │ band: LOW
Baseline response (no ZPI)
```csharp
using System;
using System.Collections.Generic;
public record Person(string Email, string Name);
public class PersonEqualityComparer : IEqualityComparer<Person>
{
public bool Equals(Person? x, Person? y)
{
if (x == null && y == null) return true;
if (x == null || y == null) return false;
return string.Equals(x.Email.ToLower(), y.Email.ToLower(), StringComparison.Ordinal);
}
public int GetHashCode(Person obj)
{
return obj.Email.ToLower().GetHashCode();
}
}
class Program
{
static void Main()
{
var person1 = new Person("John.Doe@example.com", "John Doe");
var person2 = new Person("john.doe@example.com", "Jane Doe");
var comparer = new PersonEqualityComparer();
Console.WriteLine(comparer.Equals(person1, person2)); // Outputs: True
}
}
```
In this code:
- We define a `Person` record with `Email` and `Name` properties.
- We create a custom `PersonEqualityComparer` class that implements `IEqualityComparer<Person>`.
- The `Equals` method checks if the lowercased `Email` properties of two `Person` objects are equal.
- The `GetHashCode` method returns a hash code for a `Person` object based on the lowercased `Email` property.
- In the `Main` method, we demonstrate the usage of the custom comparer by comparing two `Person` objects with different email cases.
Enhanced response (with ZPI)
```csharp
public class PersonEmailEqualityComparer : IEqualityComparer<Person>
{
public bool Equals(Person? x, Person? y)
{
if (x == null && y == null) return true;
if (x == null || y == null) return false;
return string.Equals(x.Email, y.Email, StringComparison.OrdinalIgnoreCase);
}
public int GetHashCode(Person obj)
{
return obj.Email.ToLowerInvariant().GetHashCode();
}
}
```
This comparer uses `StringComparison.OrdinalIgnoreCase` for case-insensitive comparison in the `Equals` method and `ToLowerInvariant` in the `GetHashCode` method to ensure consistent hash codes for the same email address regardless of case.
Grader chain
Each grader reads the same baseline + enhanced pair and casts an independent verdict. Disagreement is the framework's own signal — not noise to be averaged away.
V1samba/Meta-Llama-3.3-70B-Instruct
BetterV4qwen2.5-coder-3b-instruct
BetterV5openrouter/qwen/qwen3-235b-a22b-2507
BetterV7qwen2.5-coder-7b-instruct
BetterV8openai/gpt-4.1
BetterV9anthropic/claude-opus-4-7
WorseV12openai/gpt-4o
BetterComments
Our grader said what it said. What do you say? Comment as a guest below.
No comments yet. Be the first to say what you make of this round.