Software Engineering Stack Exchange is a question and answer site for professionals, academics, and students working within the systems development life cycle who care about creating, delivering, and maintaining software responsibly. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

First of all I am not a professional programmer, but a student with a programming hobby so I am sorry if my question is stupid.

I want to write a chess engine to be used on the web and had already started writing it in JavaScript. After searching around I however found out that JavaScript is not ideal for this task. I have already written the user interface in JavaScript and would prefer if I could keep it while rewriting the game logic in python. Is this possible?

share|improve this question
    
JavaScript is no less ideal for this task than Python. – Fengyang Wang Sep 11 at 0:42
    
@FengyangWang The problem with JavaScript is that I want to use a bitboard, which requires 64-bit integers. JavaScript only has "53-bit" floating point numbers. – Lasse Møldrup Sep 11 at 1:47
    
It is possible to make very effective chess AI without bit boards. I won a tournament without them. – CandiedOrange Sep 11 at 1:50
1  
Python does not have built-in 64-bit integers either (int will not be as fast as native 64-bit ints, even in Python 2, because of overflow checks); if your goal is performance, you will not get it with either language. To use 64-bit integers in JavaScript, it is typical to use a library which offers them. – Fengyang Wang Sep 11 at 1:51
    
Additionally, bitboards do not actually need full support of 64-bit integers; it suffices to pass around a pair of 32-bit integers containing the high and low bits. – Fengyang Wang Sep 11 at 1:52

As you can see in the comments python will not resolve all your problems. But you can you use third-party libraries.

Also you can you some web-frameworks to make web-site with Java-script UI but Python logic.

Flask will be a good boilerplate for you.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.