OZONE Asylum
Forums
DHTML/Javascript
Expert systems :: a sudoku expert
This page's ID:
27810
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Zone rows would be genes (no special encoding required, if you come to think of it, sudoku grids already "are" genomes with a decimal encoding). Sounds like you had an ubber-pompous-unclear teacher dude, don't want to sound rude but it all seems a lot less complex / rigid to me, in that wether to use elitism (what you describe in your first sentences) is a choice, not a requirement. Been chit-chatting almost all week with a good friend, a biologist, and I think I finally got a crystal clear picture of the thing. She brought up the same points you raised but I think my "design" duty is over, and I have my plan. On to the actual implementation. Let's hope I am not mistaken... Anyway, thank you, posting the code here, it's the empty "gui" for now, it will act as a reference to me: [code] <html> <head> <style type="text/css"> body{overflow: hidden; background: #446644; text-align: center; font-family: arial; font-size: 12px; } .mainFrame{position: relative; text-align: center; background: #ccb888; /*top: 20px; left: 20px;*/ width: 500px; height: 500px; border: 1px solid black;} .subFrame{position: relative; background: #ffebbb; top: 1px; left: 1px; width: 33.33%; height: 33.33%; border: 1px solid black; float: left;} .cell{position: relative; background: #ffebbb; top: 1px; left: 1px; width: 33%; height: 33%; border: 1px dashed gray; float: left;} input{ background: #ddc999; } </style> <script type="text/javascript" src="utils.js"></script> </head> <body> <div class="mainFrame"> <div class="subFrame"> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> </div> <div class="subFrame"> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> </div> <div class="subFrame"> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> </div> <div class="subFrame"> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> </div> <div class="subFrame"> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> </div> <div class="subFrame"> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> </div> <div class="subFrame"> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> </div> <div class="subFrame"> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> </div> <div class="subFrame"> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> <div class="cell"></div> </div> <form> Generation: <input type="text" size="2" /> Extremums: <input type="text" size="2" /><input type="text" size="2" /> Time elapsed: <input type="text" size="10" id="hourGlass" /><br/><br/> <input type="button" value="Start resolution"/><input type="button" value="|> Step"/><input type="button" value="|| Pause"/><input type="button" value="[] Clear"/> </form> </div> </body> </html> [/code] [code] var timeLine = 0; var baseTime = 0; var deltaT = 0; var allLayers = 0; //************ (Conan the) destruct0r function unload_gui(){ timeLine = null; allLayers = null; } //************ Grid object function grid(){ var tmp = new Array(); return tmp; } //************ Control timer, for gui functions function timer(){ } //************ Cell object? function cell(value){ this.value = value; } //************ Mouse event handlers for cells function hoover(){ this.style.defaultBackground = this.style.background; this.style.background = "#ffee00"; } function unhoover(){ this.style.background = this.style.defaultBackground; } function cellclicked(){ this.style.background = "#bbbbbb"; } //************ Initialisation (constructor, so to speak) function initialize_gui(){ timeLine = setInterval("timer",1); var obj = new grid(); //grid[1][1] = "toast"; var i = 0; allLayers = document.body.getElementsByTagName("div"); var workaround = allLayers.length; while(++i<allLayers.length){ var tmp = allLayers[i].className; if(allLayers[i].className == "cell"){ allLayers[i].onmouseover = hoover; allLayers[i].onmouseout = unhoover; allLayers[i].onmousedown = cellclicked; allLayers[i].onmouseup = unhoover; } } } //************ Constructor / Destructor bindings window.onload = initialize_gui; window.onunload = unload_gui; [/code]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »