cancel
Showing results for
Did you mean:

## chess for AI? Level 8

the pawn starts off in the 1 move or 2 moves. the two moves makes capturing easier.
- the math is a center pawn denominator is 2.

where you make the pawn move matters (the left side pawn(a), the middle pawn(e), the right side pawn(h)).
its easier to go white queen side pawn(a to d), than either the center or king side.
- the math is go to the queen side denominator for an advantage.

then you setup your white pawn pieces and then setup the other pieces and then capture.
- the valuable and less valuable center pawn denominator each equal 50 percent.

which becomes this when you add in the chess logic:

if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};}
else if ((queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)}){(king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)};}

which then becomes this code:

if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)})
{
(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};
if((queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)})
{
if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};}
else if not ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 25 percent denominator)};}
}
}
else if ((queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)})
{
(king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)};
if((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)})
{
if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};}
else if not ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 25 percent denominator)};}
}
}

which then becomes this code:

if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)})
{
(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};

if ((queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)})
{
(king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)};
if((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)})
{
if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};}
else if not ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 25 percent denominator)};}
}
}

else if(not (queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)})
{
if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};}
else if not ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 25 percent denominator)};}
}
}

else if ((queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)})
{
(king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)};

if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)})
{
(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};
if((queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)})
{
if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};}
else if not ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 25 percent denominator)};}
}
}

else if(not (king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)})
{
if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};}
else if not ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 25 percent denominator)};}
}
}

while(true)
{
if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)})
{
(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};

if ((queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)})
{
(king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)};
if((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)})
{
if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};}
else if not ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 25 percent denominator)};}
}
}

else if(not (queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)})
{
if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};}
else if not ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 25 percent denominator)};}
}
}

else if ((queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)})
{
(king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)};

if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)})
{
(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};
if((queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)})
{
if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};}
else if not ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 25 percent denominator)};}
}
}

else if(not (king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)})
{
if ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 50 percent denominator)};}
else if not ((king = true) {(queen pawn wait = true) = (king pawn = 50 percent denominator)}){(queen = true){ (queen pawn wait = false) = (queen pawn = 25 percent denominator)};}
}
}
}

1 ACCEPTED SOLUTION

Accepted Solutions Level 8

i updated the first post.

i deleted redundant posts.

i updated the pseudo code to add in the chess logic. i debugged it now it has no logical errors. its as good as it can be for simple pseudo code. now to make this into an ai idk how. like a nn ai i mean.

https://youtu.be/yrP43LB7QEQ

12 REPLIES 12 Level 8

delete Level 8

delete Level 8

delete Level 8

delete Level 8

delete Level 8

delete Level 8

delete Level 8

delete Level 8

delete  