Skip to content

Conversation

@JoshdRod
Copy link
Owner

@JoshdRod JoshdRod commented Dec 17, 2025

Formula for calculating correctness = 100(1 - e^(-(no. identical nodes /(no. nodes in solution + difference in no. nodes)))).

Formula for calculating correctness = 100(1 - e^(no. identical nodes /(no. nodes in solution + difference in no. nodes))).
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds visual feedback for answer correctness by applying background colors to response boxes. The color ranges from red (incorrect) to green (correct) based on a similarity metric between the user's answer tree and the solution tree.

  • Uncommented and activated the correctness evaluation logic that calculates similarity between expression trees
  • Implemented the evaluateCorrectness function that compares two expression trees using a formula based on identical nodes and tree size differences
  • Applied background colors to both response boxes and color boxes in the answer history

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI commented Dec 21, 2025

@JoshdRod I've opened a new pull request, #11, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

Copilot AI commented Dec 21, 2025

@JoshdRod I've opened a new pull request, #12, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits December 21, 2025 19:46
…on (#12)

Addresses question on PR #9 about helper function refactoring to reduce code duplication in response colour coding.

## Changes

- Added `getColourString()` helper function to encapsulate RGB string formatting
- Extracted repeated color string construction (8 occurrences) into single variable
This loop continues until the DFS of one of the trees is complete. The use of a for loop here was harder to read, so I replaced it with a more obvious while loop.
@JoshdRod JoshdRod changed the title <feat> Added colour to back of responses based on correctness of answer <feat> Add colour to back of responses based on correctness of answer Dec 21, 2025
@JoshdRod JoshdRod merged commit 2ad8dbf into dev-untested Dec 21, 2025
JoshdRod added a commit that referenced this pull request Dec 21, 2025
…#13)

Formula for calculating correctness = 100(1 - e^(-(no. identical nodes /(no. nodes in solution + difference in no. nodes)))).

Same as #9, just accidentally force pushed without adding these changes to my local branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants