Click here to Skip to main content
15,892,746 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: bearing angle calculation Pin
ranjanguru6-May-09 23:48
ranjanguru6-May-09 23:48 
GeneralRe: bearing angle calculation Pin
molesworth7-May-09 0:06
molesworth7-May-09 0:06 
GeneralRe: bearing angle calculation Pin
molesworth8-May-09 3:13
molesworth8-May-09 3:13 
AnswerRe: bearing angle calculation Pin
OriginalGriff6-May-09 23:52
mveOriginalGriff6-May-09 23:52 
GeneralRe: bearing angle calculation Pin
ranjanguru6-May-09 23:57
ranjanguru6-May-09 23:57 
AnswerRe: bearing angle calculation Pin
Stuart Cox7-May-09 11:01
Stuart Cox7-May-09 11:01 
AnswerRe: bearing angle calculation Pin
cp98768-May-09 15:30
cp98768-May-09 15:30 
QuestionPolygon Rendering Performance Optimization Pin
StarBP6-May-09 11:27
StarBP6-May-09 11:27 
On his blog, Roger Alsing describes a very interesting program. I wonder if it can be improved....?

Here you can find a file with Dan Bystrom’s improvements [to the EvoLisa program], plus an additional improvement (using uints instead of doubles when the fitness drops below 3/4 of uint.MaxValue). I added an additional feature which could be implemented. It allows an interlaced subset of the pixels to be tested for fitness. I also included an open-source C program I found on the Internet that generates fast random numbers, but that would not help improve the program much speed-wise due to other bottlenecks in the system, so I did not implement it. Right now the renderer seems to be the major bottleneck in the code. You may want to try using System.Windows.Shapes.Polygon instead of System.Graphics for the polygons, since then each polygon could be rerendered at will individually. Right now, rendering is the major bottleneck in the code after the updates are applied (Around 350 renders occur per second on my computer, whereas 3,500 mutates or 1,750 fitness evaluations can occur in the same time period [I tested that by commenting out code temporarily and counting to ten while the algorithm was running. The margin of error was around 10%, which is negligible in this case]). By the way, I think that using uints instead of doubles was the 60% improvement that Dan was talking about, although the improvement would be more along the lines of 3X if the Renderer was faster.

The question is, how can I implement this? (I am a high-school student who has recently begun programming, and I consider myself to be a novice-intermediate programmer). Could anyone optimize that code with all of this in mind? The key is to use System.Windows.Shapes.Polygon so only one polygon would usually need to be rendered per generation (maybe two or three, but certainly not all of them as is required now). Before you ask, NO, THIS IS NOT A HOMEWORK ASSIGNMENT!!!
QuestionWhich language is this Urgent help required Pin
Sanjaykalsi5-May-09 22:55
Sanjaykalsi5-May-09 22:55 
AnswerRe: Which language is this Urgent help required Pin
OriginalGriff5-May-09 23:03
mveOriginalGriff5-May-09 23:03 
QuestionTrying to create a for loop that gives all Unique combinations without using recursive process. Pin
luke.orun5-May-09 13:49
luke.orun5-May-09 13:49 
AnswerRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
Luc Pattyn5-May-09 14:41
sitebuilderLuc Pattyn5-May-09 14:41 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
luke.orun5-May-09 22:09
luke.orun5-May-09 22:09 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
Luc Pattyn5-May-09 23:42
sitebuilderLuc Pattyn5-May-09 23:42 
AnswerRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
StarBP6-May-09 11:20
StarBP6-May-09 11:20 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
luke.orun6-May-09 12:08
luke.orun6-May-09 12:08 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
Luc Pattyn6-May-09 13:12
sitebuilderLuc Pattyn6-May-09 13:12 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
luke.orun10-May-09 12:59
luke.orun10-May-09 12:59 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. [modified] Pin
Luc Pattyn10-May-09 13:19
sitebuilderLuc Pattyn10-May-09 13:19 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
luke.orun11-May-09 2:27
luke.orun11-May-09 2:27 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
Luc Pattyn11-May-09 2:59
sitebuilderLuc Pattyn11-May-09 2:59 
GeneralRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
luke.orun11-May-09 3:04
luke.orun11-May-09 3:04 
AnswerRe: Trying to create a for loop that gives all Unique combinations without using recursive process. Pin
Bassam Abdul-Baki7-May-09 7:58
professionalBassam Abdul-Baki7-May-09 7:58 
QuestionHelp Required for detrmining Polygon Type Pin
ranjanguru4-May-09 9:00
ranjanguru4-May-09 9:00 
AnswerRe: Help Required for detrmining Polygon Type Pin
Luc Pattyn4-May-09 9:30
sitebuilderLuc Pattyn4-May-09 9:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.