# Neural Network Visualization
An interactive educational tool designed to help students understand the fundamental concepts of neural networks through visual representation and animation.
## Overview
This HTML-based visualization demonstrates how neural networks process information by showing the flow of data through different layers. Created for computer science and AI education, it provides an engaging way to introduce students to machine learning concepts.
## Features
### Visual Components
- **Interactive Neural Network Diagram**: Displays a 4-layer network with input, two hidden, and output layers
- **Color-Coded Neurons**:
- Green nodes represent the Input Layer
- Blue nodes represent Hidden Layers
- Pink nodes represent the Output Layer
- **Animated Signal Flow**: Click the "Animate Signal Flow" button to watch data propagate through the network with glowing effects
- **Connection Visualization**: Shows all synaptic connections between layers
### Educational Content
- **Clear Definition**: Explains what a neural network is in simple terms
- **Layer Explanations**: Describes the function of each layer type
- **Real-World Examples**: Includes practical applications like image recognition, voice assistants, and spam filters
### Design
- Custom orange and black theme
- Architects Daughter font for a friendly, educational appearance
- Responsive layout that works on various screen sizes
- Smooth animations and hover effects
## Installation
No installation required! This is a standalone HTML file that runs entirely in the browser.
### Using the File
1. **Download**: Save the `neural_network_visualization.html` file to your computer
2. **Open**: Double-click the file or right-click and select "Open with" your preferred web browser
3. **That's it!**: The visualization will load and be ready to use
### Adding to a Website
To add this to your website:
1. Upload the HTML file to your web server
2. Link to it from your course materials or embed it in an iframe
3. No additional files or dependencies are needed
## Usage
### For Teachers
**In the Classroom:**
- Use as an introduction to neural networks in your AI curriculum
- Project on a screen and click the animation button to demonstrate signal flow
- Pause at each section to explain the concepts
- Use as a visual aid while discussing how machines learn
**As Homework:**
- Share the link with students for self-study
- Ask students to identify which layer would process specific types of information
- Have students research and add more real-world examples
**Discussion Prompts:**
- "What happens in the hidden layers?"
- "Why do we need multiple layers?"
- "Can you think of other applications that might use neural networks?"
### For Students
- Click the "Animate Signal Flow" button to see how information moves through the network
- Observe how each layer lights up sequentially
- Read the explanations for each layer type
- Explore the real-world examples section
## Technical Details
### Browser Compatibility
- Works in all modern browsers (Chrome, Firefox, Safari, Edge)
- No plugins or extensions required
- Uses HTML5 Canvas for drawing
- JavaScript for animations
### File Structure
- Single HTML file containing all code (HTML, CSS, JavaScript)
- External font loaded from Google Fonts (Architects Daughter)
- No external images or assets required
### Canvas Specifications
- Canvas size: 900x500 pixels
- Node radius: 20 pixels
- 4 layers with varying node counts (4, 6, 6, 3)
- Animation frame rate: ~60 FPS
## Customization
You can easily customize this visualization by editing the HTML file:
### Change Colors
Look for these color values in the CSS and JavaScript:
- `#ff8c00` - Primary orange
- `#ffa500` - Secondary orange
- `#00ff00` - Input layer (green)
- `#00bfff` - Hidden layers (blue)
- `#ff69b4` - Output layer (pink)
### Modify Network Structure
Find the `layers` array in the JavaScript section:
```javascript
const layers = [
{ x: 100, count: 4, color: '#00ff00', label: 'Input' },
{ x: 300, count: 6, color: '#00bfff', label: 'Hidden 1' },
{ x: 500, count: 6, color: '#00bfff', label: 'Hidden 2' },
{ x: 700, count: 3, color: '#ff69b4', label: 'Output' }
];
```
Adjust the `count` value to change the number of nodes per layer, or add/remove layers.
### Change Animation Speed
Find this line in the `animate()` function:
```javascript
animationProgress += 0.015;
```
Increase the value for faster animation, decrease for slower.
## Educational Standards Alignment
This tool supports learning objectives related to:
- Introduction to Artificial Intelligence
- Machine Learning Fundamentals
- Computer Science Concepts
- Data Processing and Pattern Recognition
## Credits
Created for Broward County Public Schools AI education curriculum.
## License
Free to use for educational purposes.
## Support
For questions or suggestions about this visualization, please contact your course instructor.
## Version History
**Version 1.0** (November 2025)
- Initial release
- 4-layer neural network visualization
- Animated signal flow feature
- Educational content sections
- Orange and black theme with Architects Daughter font
---
**Perfect for AI in the World classes and computer science education!**