This article will give you tips and facts about how you can make your website lighter and faster. Website optimization is often underestimated by web programmers but it is very important for 3 reasons:
-> User Experience
By optimizing your website, it will be downloaded faster and use the cache of the user's web browser to provide a more comfortable user experience while browsing the website.
-> Bandwidth
Making your website smaller will save you upload bandwidth and your users will save download bandwidth. It's always good to save money and performance by using a smarter code and techniques.
-> Search Engine Optimization
Search Engines are very happy when they see a page optimized which allow them to analyze the pages much quicker. Search Engines are one of the best way to attract new users.
To optimize your website, there are 5 things to take care of:
-> HTML
-> CSS
-> JavaScript
-> Images
-> Number of Requests
One thing to know to optimize a websi... View In Full
Introduction
Pathfinding algorithms are search methods and are a type of artificial intelligence. They can be used to search for many things such as finding the fastest way to go from a point to another by considering different lands and obstacles.
Initialization
First we need to initialize our values, here are the values required for a basic 2D maze:
1. Map (into array/vector)
2. Starting Point
3. End Point
First, we need a map, in the case of a 2D maze, we can create a square or a rectangle into an array/vector. To make your maze into an array or a vector, you need to split your maze into small squares, each square is a location that the algorithm will use, and each square can have a value which determines what kind of land this square is. If you make an array/vector of int (integer) you can then set a different number for each different land, here's an example:
0 = neutral land
1 = wall / empty / non-existent
2 = water (can only go on if we use a boat, for e... View In Full
Introduction
Genetic Algorithm is a well known algorithm for artificial intelligence. It is mostly used to solve problems which can not be solved with a formula.
It uses the evolution theory to learn. It contains genes and chromosomes. Genes are 0s and 1s (binary) and chromosomes are group of genes. Specific values will be given to chromosomes and they can be as big as required. Let's make an example:
Chromosomes
Let's say we want to get an equation that result to a given number between 10 and 100. First thing we need to do is look at the values we need:
- Numbers (0-9)
- Operations (+ - * /)
So we create our chromosomes:
0000 = 0
0001 = 1
0010 = 2
0011 = 3
0100 = 4
0101 = 5
0110 = 6
0111 = 7
1000 = 8
1001 = 9
1010 = +
1011 = -
1100 = *
1101 = /
Let's say we want to find an equation that results to 32, with numbers between 0 to 9, and we want 3 numbers (so 2 operators), we would then need to use 20 genes (00111100011110101001 -> 3 * 7 + 9).... View In Full