-
Notifications
You must be signed in to change notification settings - Fork 0
svg feedback deterministic seeds #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Created a new React app for the prompt guessing game that will: - Generate creative prompts using text.pollinations.ai - Create images from prompts using image.pollinations.ai - Let users guess the prompts and provide feedback Next steps: 1. Integrate with text.pollinations.ai for prompt generation 2. Integrate with image.pollinations.ai for image generation 3. Implement prompt similarity checking for guess evaluation Closes # 140 Mentat precommits passed. Log: https://mentat.ai/log/da1bbadf-deed-4d43-b60e-4fdf03101e21
- Added utility functions for: - Generating creative prompts using text.pollinations.ai - Creating images from prompts using image.pollinations.ai - Evaluating guess similarity - Enhanced UI with loading and error states - Added disabled states for inputs during loading - Improved feedback system for user guesses - Added loading animation and error styling Closes # 140 Mentat precommits passed. Log: https://mentat.ai/log/81a96ae5-98dc-4628-985c-a96846c045de
- Added clear instructions for players - Implemented hint system after 5 attempts - Show actual prompt after successful guess - Added game won state to prevent further guesses - Improved UI feedback and styling - Added loading and disabled states for better UX Closes # 140 Mentat precommits passed. Log: https://mentat.ai/log/10c53bb0-aa10-4fdf-9153-ba6aff1b73bc
- Added proper Vite configuration - Fixed directory structure to match Vite requirements - Added missing index.css file - Updated build settings - Successfully building to dist directory The build is now working correctly and generating the necessary files. Mentat precommits passed. Log: https://mentat.ai/log/549d3bf4-9953-43bc-8d8a-e879e2a81697
|
Automatic code review is enabled for this repository. Reviewing this PR now. |
|
🚀 PR Preview deployed! Preview URL: https://pollinations.github.io/hive/pr-145/ |
1 similar comment
|
🚀 PR Preview deployed! Preview URL: https://pollinations.github.io/hive/pr-145/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the deterministic seed generation changes. The implementation is good overall, with two suggested improvements: 1) resetting the seed when starting new evolution sequences for consistency, and 2) incorporating retry count into seed generation to ensure unique seeds during retries. These changes will help improve the reproducibility of the SVG generation process.
svg-feedback/index.html
Outdated
| let frames = []; | ||
| let frameIndex = 0; | ||
| let animationTimer = null; | ||
| let currentSeed = 42; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider resetting currentSeed when starting a new evolution sequence to ensure consistent results when restarting the evolution. You could add currentSeed = 42; in the startEvolution() function.
svg-feedback/index.html
Outdated
| const seed = parseInt(elements.seed.value) >= 0 ? | ||
| parseInt(elements.seed.value) : | ||
| Math.floor(Math.random() * 1000000) + retryCount; // Add retryCount to ensure different seeds | ||
| currentSeed++; // Use and increment the deterministic seed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The seed increment should consider the retry count to ensure different seeds on retries. Consider:
| currentSeed++; // Use and increment the deterministic seed | |
| currentSeed++ + retryCount; // Use deterministic seed with retry offset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes to make seed generation deterministic are a good improvement for reproducibility. I agree with both suggestions from devloai[bot]:
- Resetting
currentSeedinstartEvolution()will ensure consistent behavior when restarting evolution sequences - Including the retry count in seed generation is important to maintain unique seeds during retries
A few additional suggestions:
It might also be worth adding a UI element to display the current seed being used, which could help users reproduce specific results they like.
Thanks for using MentatBot. Give comments a 👍 or 👎 to help me improve!
You can change my review settings on my settings page.
svg-feedback/index.html
Outdated
| let frames = []; | ||
| let frameIndex = 0; | ||
| let animationTimer = null; | ||
| let currentSeed = 42; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a comment explaining why we chose 42 as the initial seed value and documenting that this is our deterministic starting point for reproducibility.
svg-feedback/index.html
Outdated
| const seed = parseInt(elements.seed.value) >= 0 ? | ||
| parseInt(elements.seed.value) : | ||
| Math.floor(Math.random() * 1000000) + retryCount; // Add retryCount to ensure different seeds | ||
| currentSeed++; // Use and increment the deterministic seed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorporating both the incrementing seed and retry count will ensure unique seeds for retries while maintaining deterministic behavior.
| currentSeed++; // Use and increment the deterministic seed | |
| currentSeed++ + retryCount; // Use deterministic seed with retry offset |
|
🚀 PR Preview deployed! Preview URL: https://pollinations.github.io/hive/pr-145/ |
1 similar comment
|
🚀 PR Preview deployed! Preview URL: https://pollinations.github.io/hive/pr-145/ |
Testing .mentatTesting ai-chatTesting static HTML app: ai-chat Testing graphics-editorTesting static HTML app: graphics-editor Testing llm-feedbackTesting static HTML app: llm-feedback Testing millionaire-gameTesting static HTML app: millionaire-game Testing placeholder-generatorTesting Node.js app: placeholder-generator Installing dependenciesℹ️ No tests found BuildingTesting pollinations-image-showTesting Node.js app: pollinations-image-show Installing dependenciesℹ️ No tests found BuildingTesting prompt-guessing-gameTesting Node.js app: prompt-guessing-game Installing dependenciesℹ️ No tests found BuildingTesting svg-feedbackTesting static HTML app: svg-feedback ❌ HTML tests failed for svg-feedback Testing tarot-readerTesting Node.js app: tarot-reader Installing dependenciesℹ️ No tests found Building |
No description provided.