Skip to content

Commit

Permalink
Fix the spelling mistakes of docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
XU-Boqing committed Jan 11, 2025
1 parent bbaed4d commit 2563815
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/source/_static/modulebase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/source/example/Brax.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
"# Set the maximum number of generations\n",
"max_generation = 3\n",
"\n",
"# Run the worflow\n",
"# Run the workflow\n",
"for index in range(max_generation):\n",
" print(f\"In generation {index}:\")\n",
" t = time.time()\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/source/example/custom_algo_prob.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
" # Compute fitness\n",
" fitness = self.evaluate(self.population)\n",
"\n",
" # Update the lbest and the gbest\n",
" # Update the local best fitness and the global best fitness\n",
" compare = self.local_best_fitness - fitness\n",
" self.local_best_location = torch.where(\n",
" compare[:, None] > 0, self.population, self.local_best_location\n",
Expand All @@ -104,7 +104,7 @@
" + self.phi_g * rg * (self.global_best_location - self.population)\n",
" )\n",
"\n",
" # Udpdate the population\n",
" # Update the population\n",
" population = self.population + velocity\n",
" self.population = clamp(population, self.lb, self.ub)\n",
" self.velocity = clamp(velocity, self.lb, self.ub)\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/source/guide/developer/1-modulebase.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

A **module** is a fundamental concept in programming that refers to a self-contained unit of code designed to perform a specific task or a set of related tasks.

This notebook will introduce the basic module in Evox: {doc}`ModuleBase <apidocs/evox/evox.core.module>`.
This notebook will introduce the basic module in EvoX: {doc}`ModuleBase <apidocs/evox/evox.core.module>`.

## Introduction of Module

Review the basic running process in EvoX we have mentioned in the {doc}`Quick Start <guide/user/1-start>` of the {doc}`User Guide <guide/user>`:
in the {doc}`Quick Start <guide/user/1-start>` of the {doc}`User Guide <guide/user>`, we have mentioned the basic running process in EvoX:

<center><b>Initiate an algorithm and a problem -- Set an monitor -- Initiate a workflow -- Run the workflow</b></center>

Expand Down
16 changes: 8 additions & 8 deletions docs/source/guide/developer/3-custom-alg-pro.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,40 +65,40 @@ Here we give an example of **implementing a PSO algorithm that solves the Sphere
Here is a pseudo-code:

```text
Set hyperparameters
Set hyper-parameters
Generate the initial population
Do
Compute fitness
Update the lbest and the gbest
Update the velocity
Udpdate the population
Update the population
Until stopping criterion
```

And here is what each part of the algorithm and the problem corresponds to in EvoX.

```python
Set hyperparameters # Algortihm.__init__
Set hyper-parameters # Algorithm.__init__

Generate the initial population # Algortihm.setup
Generate the initial population # Algorithm.setup
Do
# Problem.evaluate (not part of the algorithm)
Compute fitness

# Algortihm.step
# Algorithm.step
Update the lbest and the gbest
Update the velocity
Udpdate the population
Update the population

Until stopping criterion
```

### Algorithm example: PSO algorithm

Particle Swarm Optimization (PSO) is a population-based metaheuristic algorithm inspired by the social behavior of birds and fish. It is widely used for solving continuous and discrete optimization problems.
Particle Swarm Optimization (PSO) is a population-based meta-heuristic algorithm inspired by the social behavior of birds and fish. It is widely used for solving continuous and discrete optimization problems.

**Here is an implementation example of PSO algorithm in EvoX:**

Expand Down Expand Up @@ -172,7 +172,7 @@ class PSO(Algorithm):
+ self.phi_g * rg * (self.global_best_location - self.population)
)

# Udpdate the population
# Update the population
population = self.population + velocity
self.population = clamp(population, self.lb, self.ub)
self.velocity = clamp(velocity, self.lb, self.ub)
Expand Down
10 changes: 5 additions & 5 deletions docs/source/guide/user/1-start.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"metadata": {},
"outputs": [],
"source": [
"# install evox, skip it if you have already installed evox\n",
"# install EvoX, skip it if you have already installed EvoX\n",
"from importlib.util import find_spec\n",
"\n",
"if find_spec(\"evox\") is None:\n",
Expand Down Expand Up @@ -46,7 +46,7 @@
"source": [
"## The basic running process in EvoX\n",
"\n",
"As a distributed GPU-accelerated framework for scalable evolutionary computation, EvoX can be uesd to do many kinds computations, so we say \"EvoX is all you need\". Though many kinds of computaions are different more or less, in EvoX we standard the basic running process:\n",
"As a distributed GPU-accelerated framework for scalable evolutionary computation, EvoX can be used to do many kinds computations, so we say \"EvoX is all you need\". Though many kinds of computations are different more or less, in EvoX we standard the basic running process:\n",
"\n",
"<div align='center'>\n",
" <b>Initiate an algorithm and a problem -- Set an monitor -- Initiate a workflow -- Run the workflow</b>\n",
Expand Down Expand Up @@ -86,13 +86,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Notice that the algorithm and problem themselves do not contain the monitoring of the steps, so we will not get any feed back only denpending on them. It turns out that we still need a **monitor**.\n",
"Notice that the algorithm and problem themselves do not contain the monitoring of the steps, so we will not get any feed back only depending on them. It turns out that we still need a **monitor**.\n",
"\n",
"## Set an monitor\n",
"\n",
"{doc}`Monitor <apidocs/evox/evox.workflows.eval_monitor>` is a standard class in EvoX to monitor the intermediate values inside a optimization process. Information like fitness or population can be easily obtained by the monitor.\n",
"\n",
"Doing is better than saying, so let us create a “Evalution monitor”:"
"Doing is better than saying, so let us create a “Evaluation monitor”:"
]
},
{
Expand All @@ -111,7 +111,7 @@
"source": [
"## Initiate an workflow\n",
"\n",
"A **workflow** outlines the series of steps required to accomplish a task or project. In EvoX, a workflow represents the overall process of evolutionary computation, putting the algorithm, problem, monitor together.\n",
"A **workflow** outlines the series of steps required to accomplish a task or project. In EvoX, a workflow represents the overall process of evolutionary computation, putting the algorithm, problem and monitor together.\n",
"\n",
"If we want to run the algorithm to solve the problem with a monitor, we need to create a workflow of the {doc}`Workflow <apidocs/evox/evox.workflows>` class."
]
Expand Down
4 changes: 2 additions & 2 deletions docs/source/guide/user/2-problems.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"metadata": {},
"outputs": [],
"source": [
"# install evox, skip it if you have already installed evox\n",
"# install EvoX, skip it if you have already installed EvoX\n",
"from importlib.util import find_spec\n",
"\n",
"if find_spec(\"evox\") is None:\n",
Expand Down Expand Up @@ -444,7 +444,7 @@
"# Set the maximum number of generations\n",
"max_generation = 3\n",
"\n",
"# Run the worflow\n",
"# Run the workflow\n",
"for index in range(max_generation):\n",
" print(f\"In generation {index}:\")\n",
" t = time.time()\n",
Expand Down

0 comments on commit 2563815

Please sign in to comment.