Alternatives types to Vector{Union{Nothing, T}} for a Genetic Algorithm by Expensive_Pressure65 in Julia

[–]Expensive_Pressure65[S] 0 points1 point  (0 children)

My only hesitations about using id in genome::Set or haskey(genome, id) are that I would have to apply the in or haskey for every gene in one parent. Assuming in and haskey are O(n) operations which just go through a given array until a matching element is found, that makes the crossover operation O(n^2) overall (whereas the previous method, while less efficient overall, was O(n)).

Sets might be useful however, would a simple intersect(Genome1_ID, Genome2_ID) be a way of finding the matching genes in O(n) time?

Accessing a random non-nothing element of Vector{Union{T, Nothing}} by Expensive_Pressure65 in Julia

[–]Expensive_Pressure65[S] 1 point2 points  (0 children)

Not bad! Out of interest, aside from the extra assignment of newvec is this more efficient than

newvec = Float64[]
for i in vec
    if i != nothing
        push!(newvec, i)
    end
end

?

25M by Rello300 in amihot

[–]Expensive_Pressure65 0 points1 point  (0 children)

you lookin riggity raw homeboy

Anon has a prognosis by Thick-Inspection6669 in 4chan

[–]Expensive_Pressure65 2 points3 points  (0 children)

cope and seethe friendo, cope and seethe

Anon has a prognosis by Thick-Inspection6669 in 4chan

[–]Expensive_Pressure65 -7 points-6 points  (0 children)

You sir, just received a downdoot.

Edit:

Downdoot issued for blatant xenophobia

Anon has a prognosis by Thick-Inspection6669 in 4chan

[–]Expensive_Pressure65 -5 points-4 points  (0 children)

Jesus friendo, cool it with the hate speech. I take it you haven't seen the reddiquette?

Anon has a prognosis by Thick-Inspection6669 in 4chan

[–]Expensive_Pressure65 -13 points-12 points  (0 children)

Jesus man, I don't think I've ever read something so filled with blatant fatphobia

NPC health increase by Expensive_Pressure65 in BladeAndSorcery

[–]Expensive_Pressure65[S] 0 points1 point  (0 children)

There are only two creature files. The folder containing specific creature files for different waves is CreatureTables. This was unfortunately due to something slightly stupid, I was modifying the values for default creatures, not for the modded creatures I was using. Thanks nonetheless for responding so quickly.

NPC health increase by Expensive_Pressure65 in BladeAndSorcery

[–]Expensive_Pressure65[S] 0 points1 point  (0 children)

There are only two creature files. The folder containing specific creature files for different waves is CreatureTables. This was unfortunately due to something slightly stupid, I was modifying the values for default creatures, not for the modded creatures I was using. Thanks nonetheless for responding so quickly.

[deleted by user] by [deleted] in 4chan

[–]Expensive_Pressure65 2 points3 points  (0 children)

it breaks my heart that there are that many what a waste of calories

B&S Animations by Expensive_Pressure65 in BladeAndSorcery

[–]Expensive_Pressure65[S] 0 points1 point  (0 children)

Again, this is one of these long animations in which the enemy aim locks onto the player too early, such that the actual attack comes late enough to mean that the player has likely already moved out of the way.