Skip to main content

All Questions

8votes
2answers
920views

2D block game like Minecraft

I have been working on a 2D block game. I like the progress I am making, but I would like to improve the performance and the overall quality of the code. The code and textures are stored in my GitHub ...
coder's user avatar
6votes
2answers
232views

(HackerRank) Project Euler+ #250: 250250

Link to problem: linkNumber of solvers: 27 out of 844Solve rate (per person): 3.199%Success rate (over all submissions): 1.78% Project Euler+ on HackerRank is basically supposed to be a generalization ...
CrSb0001's user avatar
3votes
4answers
1kviews

Calculate optimal game upgrades

I'm looking for ways to improve the performance of this code. Using numba helps performance, but I'm not sure how to further improve it. Any (relatively) simple ...
ayaan098's user avatar
2votes
2answers
250views

Infinite 2d block world (2d minecraft) with chunk system, physics and slower loading

Follow up from this question. I have added a slower loading system that allows the main game to run faster but I still get under 30 fps with caves even if I allow the player to outrun the loading. I ...
coder's user avatar
3votes
1answer
93views

Optimizing sieving code for the Multiple Polynomial Quadratic Sieve

I wrote code for the multiple polynomial quadratic sieve (MPQS) here: ...
J. Doe's user avatar
7votes
5answers
815views

adding data to a CSV file for it to be read

I'm making a program that lets you enter a name and house that adds it to the CSV file for it to be read and print out "Tre is in house Dragon", etc. The code works; I'm just wondering if ...
Big_Port's user avatar
7votes
3answers
830views

Generate all the free polyominoes who's width and height is no larger than 8

I'm working on a puzzle game and I need all the free polyominoes that can fit into an 8 by 8 grid. My code uses Redelmeier's Alogorithm for enumerating them, checks them for rotations and reflections, ...
timeslidr's user avatar
4votes
1answer
117views

Calculate optimal game upgrades, v2

This is the second iteration of the code I originally posted here: Calculate optimal game upgrades. Based on the feedback there, I chose to change the code to use a dynamic programming approach with ...
ayaan098's user avatar
3votes
5answers
2kviews

How do I speed up this simulation program

This is a program to solve a differential equation numerically using Euler method. As of now, it is very slow, and I need to run 10000 Monte Carlo simulations. The differential equation is called ...
Jonathan Wick's user avatar
1vote
2answers
138views

Printing a pattern of input string in X shape

Context: Write a program to print the output for the given input(Example is given in comments of my code). String is of odd length. I would be grateful if anyone could give feedback on my following ...
Silah's user avatar
4votes
4answers
1kviews

Creating an O(n) algorithm for an array of integers

To avoid plagiarism in my university, I am going to modify the problem. Henry likes to jump from building to building. The heights of each building are given as a list of H numbers. We also number ...
Lesserrafim's user avatar
1vote
1answer
284views

Rules-engine to be improved/simplified for Efficiency (performance), Extensibility and Maintenance?

This is a simple implementation of a rules engine. I am really hating the very long MATCH/CASE function. I am wondering what kind of Design Patterns could be used there to make this code more ...
user avatar
7votes
3answers
2kviews

Leetcode problem 8 (atoi). Why is my solution so slow?

This is my solution to Leetcode problem 8, the atoi problem, in Python 3. This is just a generic atoi routine that converts any ...
Ranch Mayonaise's user avatar
5votes
2answers
330views

Simple version of NEAT

I have wrote my own simple version of NEAT and want to improve the code for mainly performance (training and runtime of a generation). This simple version of NEAT aims to perform somewhere near as ...
coder's user avatar
8votes
3answers
2kviews

Algorithm "sort except zero"

Task: Sort the integers in sequence in sequence. But the position of zeros should not be changed. Input: List of integers (int). Output: List or another Iterable (tuple, generator, iterator) of ...
Глеб's user avatar

153050per page
close