hey!
to anyone out there who might be able to help me
with my problem about the knight's tour using php
pls. help me..
i've come up with a long solution...
?>
$chessboard=array
(
0 => array (0,0,0,0,0,0,0,0),
1 => array (0,0,0,0,0,0,0,0),
.
.
.
7 => array (0,0,0,0,0,0,0,0),
);
//filling the whole 64 squares 1 by 1 on 1 starting point [3] [4].
$chessboard[3 ] [ 4] = 1 ;
...
...
echo "<table>";
for ($i=1;$i<8,$i++)
{
echo "<tr>"
for ($j=1;$j<8;$j++);
{
echo"<td>".$Chessboard[$i][$j]."</td>";
}
echo "</tr>"
}
?>
im looking for anyone that could give me an idea on how to make the knight's tour on all 64 chess squares without doing a code for each square and for each different starting point.
3 3449
Have you read the wiki entry for this problem yet?
most search i've been to only offers me concepts using mathemetical equations but not on code basis..so if an7yone could share to me their knowledge..
i would really appreciate it..
most search i've been to only offers me concepts using mathemetical equations but not on code basis..so if an7yone could share to me their knowledge..
i would really appreciate it..
Mathematics is the language of logic.
Logic is the language of computers.
Computers easily implement mathematics.
Computers are surprisingly very good at arithmetic and calculations.
Computers can be programmed via code.
Copy and paste the equation (problem) in mathematic notation, attempt to translate it to code (easy).
If unsuccessful, post your code.
Sign in to post your reply or Sign up for a free account.
Similar topics PHILIP BARTLETT, KNIGHT, PHILIP BARTLETT, KNIGHT, PHILIP BARTLETT, KNIGHT, PHILIP BARTLETT, KNIGHT, STORY OF, PHILIP BARTLETT, KNIGHT
by: googlegroups111 |
last post by:
This is an EXCERPT from the story of the Philip Bartlett the Knight in
Shining Armour from the days of hoary olde England, a story adapted by
an author who shall remain nameless..... One day...
|
by: Ekhaat |
last post by:
Hi
I followed the Web Matrix guided tour and came to the "ASP.NET Pages with
Data
(Microsoft Access)" part.
There is really not much you can do wrong there, but for some reason, the
INSERT...
|
by: James |
last post by:
I've tried an XML service in a VB.NET Guided Tour sample.
In Step 6-5, I couldn't create a new category
called "TaskManagement" in the "Performance Counter" path.
It doesn't show...
|
by: whitehatmiracle |
last post by:
im stuck, thers a prob with the backtrack function.
#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#define size 5
|
by: Xah Lee |
last post by:
A Lambda Logo Tour
(and why LISP languages using λ as logo should not be looked upon
kindly)
Xah Lee, 2002-02
Dear lispers,
The lambda character λ, always struck a awe in me, as with...
|
by: foahchon |
last post by:
Hi, I'm trying to write a program to solve (or whatever) the Knight's Tour. I know this is a pretty common problem, but I haven't found a solution that I can really compare mine to and isolate what...
|
by: Bert |
last post by:
This is a past question from a programming competition.
On a chess board (8 squares by 8 squares), there's is a knight sitting
on b1 (2 from the left of the bottom row). To cut the crap, find out...
|
by: slapsh0t11 |
last post by:
Hello,
I know this is a popular problem with a lot of solutions, but I don't want to be pointed to a post by someone else with THEIR solution. I want to figure out how to make my own code work. ...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |