C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28629
Number of posts: 94611

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Choosing the appropiate Network Posted by roldy on 14 Mar 2013 at 7:26 PM
I've decided to try my hand at programming neural networks since I'm in an adaptive critic course. The thing that I want to attempt is a solver for the game located here . You basically have to connect like-colored circles together without crossing over any paths and while filling up all the empty squares with a path segment. I've been reading up on Hopfield Networks and I think this is the right network to use since I am essentially going to turn on or off a node (square) depending on these conditions to check:

1) Is square already filled?
2) Is there a preceding square, either to the left or right or above and below, that has the same color?
3) Is this square located either to the left or right or above and below the preceding square?

Those are the checks that I can think of thus far.
I'm trying to start with psuedo-code to try and help me. The problem I am having is figuring out how to run through all nodes, n^2 - c (where n = number of square on an edge and c = number of colors), while keeping track of the state of each node. I'm thinking that I will have a (n^2 - c) x (n^2 - c) x c matrix. In each dimension c (1,2,3,...) I will have a summation of the penalties or rewards for each check 1,2,3. Am I correct in this logic?



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.