Files
Dmitry 422cb49b31 Add initial implementation of Hopfield and Hamming networks with web interface
- Create Dockerfile and entrypoint script for application setup
- Implement pattern loading from Excel and weight caching
- Develop core functions for Hopfield and Hamming networks
- Add Sinatra web server for user interaction
- Create HTML interface for displaying patterns and results
- Include necessary gems in Gemfile and lockfile
- Add .dockerignore and .gitignore files
2026-05-16 22:13:26 +03:00

16 lines
451 B
Ruby

require_relative 'loader'
require_relative 'functions'
require_relative 'hopfield'
require_relative 'hamming'
EPS = 0.01
PATTERNS = load_patterns('patterns.xlsx')
pattern_vectors = PATTERNS.map { |_name, m| to_vector(m) }
pattern_names = PATTERNS.keys
weights = train_hopfield(pattern_vectors)
puts "Эталоны загружены: #{pattern_names.join(', ')}"
puts "Запусти веб-интерфейс: bundle exec ruby app.rb"