Problem of the 8 queens in VB.NET and CSharp

This article deals with how to solve the problem of the 8 queens in a chessboard

Problem of the 8 queens


The problem of the eight queens is a pastime in which eight queens are put on the board without being threatened. It was proposed by the German chess player Max Bezzel in 1848. The game of the 8 queens consists of putting eight queens on a chessboard without being threatened between them.

In this article we offer a more visual solution to this problem using computer software. In the small program we did we can see the combinations that the computer uses to find the results. At the end, all the solutions found are listed.

The operation is very simple, it scans every square of the board, you can see which is checking because the letter "r" is placed, if in that position there is no queen or not in the path of movement of another queen is assigned to That position with the letter "R".

In summary:

[R]: Box where possibly the queen will be assigned.

[R]: Box with assigned position of queen.

[.]: Box marked as a path of queen movement.

The algorithm that is used is not the most efficient, but if we use pure brute force (a well-known algorithm among programmers).

It is developed in VB.NET and C# in console mode, making it easy to read and study.

We had a lot of fun developing it and well below you can download the source code and the executable.

Donwload Zone:


Compiled program:

download intarcesoft.jpg

Source code:

In VB.NET

download intarcesoft.jpg

In CS

download intarcesoft.jpg

Completely free of viruses and malicious software, so do not wait any longer to download it now.

Do not forget to give us an opinion about the program, to improve the content.

Grade 
03/28/2017

Excelente

Buen material

Write your review!

Write a review

Problem of the 8 queens in VB.NET and CSharp

Problem of the 8 queens in VB.NET and CSharp

This article deals with how to solve the problem of the 8 queens in a chessboard

Ask a question

NO registration required!

If the question you have has not yet been answered here, use the form below to ask something about this addon.

(optional)
*(Required to be notified when an answer is available)

If the download link redirects to another product that is not described in the article or is broken, report it using our Reporting Form

RelatedProducts