The Art of War by Sun Tzu, translated by Lionel Giles, read by Bob Newfeld. Chapter 1 Laying Plans The Art of War is of vital importance to the state. It is a matter of life and death, a road either to safety or to ruin. Hence it is a subject of inquiry which can on no account be neglected. The Art of War then is governed by five constant factors, to be taken into account in one's deliberations when seeking to determine the conditions obtaining in the field. These are the moral law, heaven, earth, the commander, method and discipline. The moral law causes the people to be in complete accord with their ruler, so that they will follow him regardless of their lives, undismayed by any danger. Heaven signifies night and day, cold and heat, times and seasons. Earth comprises distances great and small, danger and security, open ground and narrow passes, the chances of life and death. The commander stands for the virtues of wisdom, sincerity, benevolence, courage and strictness. Method and discipline are to be understood the marshalling of the army in its proper subdivisions, the graduations of rank among the officers, the maintenance of roads by which supplies may reach the army, and the control of military expenditure. These five heads should be familiar to every general. He who knows them will be victorious, he who knows them not will fail. Therefore, in your deliberations, when seeking to determine the military conditions, let them be made the basis of a comparison in this wise. Which of the two sovereigns is imbued with the moral law? Which of the two generals has most ability? With whom lie the advantages derived from heaven and earth? On which side is discipline most rigorously enforced? Which army is stronger? On which side are officers and men more highly trained? In which army is there the greater constancy, both in reward and punishment? By means of these seven considerations, I can forecast victory or defeat. The general that hearkens to my counsel and acts upon it will conquer. Let such a one be retained in command. The general that hearkens not to my counsel nor acts upon it will suffer defeat. Let such a one be dismissed. While heeding the prophet of my counsel, avail yourself also of any helpful circumstances over and beyond the ordinary rules. According as circumstances are favourable, one should modify one's plans. All warfare is based on deception, hence when able to attack we must seem unable, when using our forces we must seem inactive, when we are near we must make the enemy believe we are far away, when far away we must make him believe we are near. Hold out baits to entice the enemy, feign disorder, and crush him. If he is secure at all points, be prepared for him. If he is in superior strength, evade him. If your opponent is of choleric temper, seek to irritate him, pretend to be weak, that he may grow arrogant. If he is taking his ease, give him no rest, if his forces are united, separate them. Attack him where he is unprepared, appear where you are not expected. These military devices, leading to victory, must not be divulged beforehand. Now, the general who wins a battle makes many calculations in his temple ere the battle is fought. The general who loses a battle makes but few calculations beforehand. Thus do many calculations lead to victory, and few calculations to defeat, how much more no calculation at all. It is my attention to this point that I can foresee who is likely to win or lose. Chapter 2 Waging War In the operations of war, where there are in the field a thousand swift chariots, as many heavy chariots, and a hundred thousand male clad soldiers, with provisions enough to carry them a thousand lee, the expenditure at home and at the front, including entertainment of guests, small items such as glue and paint, and some spent on chariots and armour, will reach the total of a thousand ounces of silver per day. Such is the cost of raising an army of one hundred thousand men. When you engage in actual fighting, if victory is long in coming, then men's weapons will grow dull and their ardour will be damned. If you lay siege to a town, you will exhaust your strength. Again, if the campaign is protracted, the resources of the state will not be equal to the strain.  Even no man, however wise, will be able to avert the consequences that must ensue.  There is no instance of a country having benefited from prolonged warfare. It is only one who is thoroughly acquainted with the evils of war that can thoroughly understand the profitable way of carrying it on. The skillful soldier does not raise a second levy, neither are his supply wagons loaded more than twice. Bring warm material with you from home, but forage on the enemy, thus the army will have food enough for its needs. Poverty of the state exchequer causes an army to be maintained by contributions from a distance, contributing to maintain an army at a distance causes the people to be impoverished. On the other hand, the proximity of an army causes prices to go up, and high prices cause the people's substance to be drained away. When their substance is drained away, the peasantry will be afflicted by heavy exactions. With this loss of substance and exhaustion of strength, the homes of the people will be stripped bare, and three-tenths of their income will be dissipated, while government expenses for broken chariots, worn-out horses, breastplates and helmets, bows and arrows, spears and shields, protective mantles, draught oxen and heavy wagons will amount to four-tenths of its total revenue. Hence, a wise general makes a point of foraging on the enemy. One cartload of the enemy's provisions is equivalent to twenty of one's own, and likewise a single pecule of his provinder is equivalent to twenty from one's own store. Now, in order to kill the enemy, our men must be roused to anger, that there may be advantage from defeating the enemy, they must have their rewards. Therefore, in chariot fighting, when ten or more chariots have been taken, those should be rewarded who took the first. Our own flags should be substituted for those of the enemy, and the chariots mingled and used in conjunction with ours. The captured soldiers should be kindly treated and kept. This is called using the conquered foe to augment one's own strength. In war, then, let your great object be victory, not lengthy campaigns. Thus it may be known that the leader of armies is the arbiter of the people's fate, the man on whom it depends whether the nation shall be in peace or in peril. Chapter III Attack by Stratagem In the practical art of war, the best thing of all is to take the enemy's country whole and intact. To shatter and destroy it is not so good. So, too, it is better to recapture an army entire than to destroy it, to capture a regiment, a detachment, or a company entire, than to destroy them. To fight and conquer in all your battles is not supreme excellence. Supreme excellence consists in breaking the army's resistance without fighting. Thus the highest form of generalship is to balk the enemy's plans. The next best is to prevent the junction of the enemy's forces. The next in order is to attack the enemy's army in the field, and the worst policy of all is to besiege walled cities. The rule is not to besiege walled cities, if it can possibly be avoided. The preparation of mantlets, movable shelters, and various implements of war will take up to three whole months, and the pining up of mounds over against the walls will take three months more. The general, unable to control his irritation, will launch his men to the assault like swarming ants, with the results that one-third of his men are slain, while the town still remains untaken. Such are the disastrous effects of besiege. Therefore the skillful leader subdues the enemy's troops without any fighting. He captures their cities without laying siege to them. He overthrows their kingdom without lengthy operations in the field. With his forces intact, he will dispute the mastery of the empire, and thus, without losing a man, his triumph will be complete. This is the method of attacking by stratagem. It is the rule in war if our forces are ten to the enemy's one to surround him, if five to one to attack him, if twice as numerous to divide our army into two. If equally matched, we can offer battle. If slightly inferior in numbers, we can avoid the enemy. If quite unequal in every way, we can flee from him. Hence, though an obstinate fight may be made by a small force, in the end it must be captured by a larger force. Now, the general is the bulwark of the state. If the bulwark is complete at all points, the state will be strong. If the bulwark is defective, the state will be weak. There are three ways in which a ruler can bring misfortune upon his army. One, by commanding the army to advance or to retreat, being ignorant of the fact that it cannot obey. This is called hobbling the army. Two, by attempting to govern an army in the same way as he administers a kingdom, being ignorant of the conditions which obtain in an army. This causes restlessness in the soldier's minds. Three, by employing the officers of his army without discrimination, through ignorance of the military principle of adaptation to circumstances, this shakes the confidence of the soldiers. But when the army is restless and distrustful, trouble is sure to come from the other feudal princes. This is simply bringing anarchy into the army and flinging victory away. Thus we may know that there are five essentials for victory. He will win who knows when to fight and when not to fight. He will win who knows how to handle both superior and inferior forces. He will win whose army is animated by the same spirit throughout all its ranks. He will win who, prepared himself, waits to take the enemy unprepared. He will win who has military capacity and is not interfered with by the sovereign. Hence the saying, if you know the enemy and know yourself, you need not fear the result of a hundred battles. If you know yourself but not the enemy, for every victory gained you will also suffer a defeat. If you know neither the enemy nor yourself, you will succumb in every battle. Chapter 4 Tactical Dispositions The good fighters of old first put themselves beyond the possibility of defeat and then waited for an opportunity of defeating the enemy. To secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself. Thus the good fighter is able to secure himself against defeat, but cannot make certain of defeating the enemy. Hence the saying, one may know how to conquer without being able to do it. Security against defeat implies defensive tactics. Ability to defeat the enemy means taking the offensive. Standing on the defensive indicates insufficient strength, attacking a superabundance of strength. The general who is skilled in defense hides in the most secret recesses of the earth. He who is skilled in attack flashes forth from the topmost heights of heaven. Thus, on the one hand, we have ability to protect ourselves, on the other, a victory that is complete. To see victory only when it is within the ken of the common herd is not the acme of excellence. Neither is it the acme of excellence if you fight and conquer and the whole empire says, well done. To lift that autumn hair is no sign of great strength. To see the sun and moon is no sign of sharp sight. To hear the noise of thunder is no sign of a quick ear. What the ancients called a clever fighter is one who not only wins, but excels in winning with ease. Hence his victories bring him neither reputation for wisdom nor credit for courage. He wins his battles by making no mistakes. Making no mistakes is what establishes the certainty of victory, for it means conquering an enemy that is already defeated. Hence the skillful fighter puts himself into a position which makes defeat impossible and does not miss the moment for defeating the enemy. Thus it is that in war the victorious strategist only seeks battle after the victory has been won, whereas he who is destined to defeat first fights and afterwards looks for victory. The consummate leader cultivates the moral law and strictly adheres to method and discipline. Thus it is in his power to control success. In respect of military method we have firstly measurement, secondly estimation of quantity, thirdly calculation, fourthly balancing of chances, fifthly victory. Measurement owes its existence to earth, estimation of quantity to measurement, calculation to estimation of quantity, balancing of chances to calculation, and victory to balancing of chances. A victorious army opposed to a routed one is as a pound's weight placed in the scale against a single grain. The onrush of a conquering force is like the bursting of pent-up waters into a chasm of a thousand fathoms deep. Chapter 5 Energy The control of a large force is the same principle as the control of a few men. It is merely a question of dividing up their numbers. Fighting with a large army under your command is no wise different from fighting with a small one. It is merely a question of instituting signs and signals. To ensure that your whole host may withstand the brunt of the enemy's attack and remain unshaken, this is affected by maneuvers, direct and indirect. That the impact of your army may be like a grindstone dashed against an egg, this is affected by the science of weak points and strong. In all fighting, the direct method may be used for joining battle, but indirect methods will be needed in order to secure victory. Indirect tactics, efficiently applied, are inexhaustible as heaven and earth, unending as the flow of rivers and streams. Like the sun and moon they end, but to begin anew, like the four seasons they pass away to return once more. There are not more than five musical notes, yet the combinations of these five give rise to more melodies than can ever be heard. There are not more than five primary colors, blue, yellow, red, white and black, yet in combination they produce more hues than can ever be seen. There are not more than five cardinal tastes, sour, acrid, salt, sweet, bitter, yet combinations of them yield more flavors than can ever be tasted. In battle there are not more than two methods of attack, the direct and the indirect, yet these two, in combination, give rise to an endless series of maneuvers. The direct and the indirect lead on to each other in turn. It is like moving in a circle, you never come to an end. Who can exhaust the possibilities of their combination? The onset of troops is like the rush of a torrent which will even roll stones along in its course. The quality of decision is like the well-timed swoop of a falcon which enables it to strike and destroy its victim. Therefore the good fighter will be terrible in his onset and prompt in his decision. Energy may be likened to the bending of a crossbow, decision to the releasing of a trigger. Amid the turmoil and tumult of battle there may be seeming disorder and yet no real disorder at all. Amid confusion and chaos your array may be without head or tail, yet it will be proof against defeat. Simulated disorder postulates perfect discipline, simulated fear postulates courage, simulated weakness postulates strength. Hiding order beneath the cloak of disorder is simply a question of subdivision. Concealing courage under a show of timidity presupposes a fund of latent energy. Masking strength with weakness is to be affected by tactical dispositions. Thus one who is skillful at keeping the enemy on the move maintains deceitful appearances according to which the enemy will act. He sacrifices something that the enemy may snatch at it. By holding out baits he keeps him on the march, then with a body of picked men he lies and waits for him. The clever combatant looks to the effect of combined energy and does not require too much from individuals, hence his ability to pick out the right men and utilize combined energy. When he utilizes combined energy his fighting men become as it were like unto rolling logs or stones, for it is the nature of a log or stone to remain motionless on level ground and to move on when on a slope, if four-cornered to come to a standstill, but if round shaped to go rolling down. Thus the energy developed by good fighting men is as the momentum of a round stone rolled down a mountain thousands of feet in height, so much on the subject of energy. Chapter 6 Weak Points and Strong Whoever is first in the field and awaits the coming of the enemy will be fresh for the fight. Whoever is second in the field and has to hasten to battle will arrive exhausted. Therefore the clever combatant imposes his will on the enemy, but does not allow the enemy's will to be imposed on him. By holding out advantages to him he can cause the enemy to approach of his own accord, or by inflicting damage he can make it impossible for the enemy to draw near. If the enemy is taking his ease he can harass him, if well supplied with food he can starve him out, if quietly encamped he can force him to move. Appear at points which the enemy must hasten to defend, march swiftly to places where you are not expected. An army may march great distances without distress if it marches through country where the enemy is not. You can be sure of succeeding in your attacks if you only attack places which are undefended. You can assure the safety of your defense if you only hold positions that cannot be attacked. Hence that general is skillful in attack whose opponent does not know what to defend, and he is skillful in defense whose opponent does not know what to attack. Oh divine art of subtlety and secrecy! Through you we learn to be invisible, through you inaudible, and hence we can hold the enemy's fate in our hands. You may advance and be absolutely irresistible if you make for the enemy's weak points. You may retire and be safe from pursuit if your movements are more rapid than those of the enemy. If we wish to fight, the enemy can be forced to an engagement even though he be sheltered behind a high rampart and a deep ditch. All we need do is attack some other place that he will be obliged to relieve. If we do not wish to fight, we can prevent the enemy from engaging us even though the lines of our encampment may be merely traced out on the ground. All we need do is to throw something odd and unaccountable in his way. By discovering the enemy's dispositions and remaining invisible ourselves, we can keep our forces concentrated, while the enemies must be divided. We can form a single united body while the enemy must split up into fractions. Hence there will be a hole pitted against separate parts of a hole, which means that we shall be many to the enemy's few. If we are able thus to attack an inferior force with a superior one, our opponents will be in dire straits. The spot where we intend to fight must not be made known, for then the enemy will have to prepare against a possible attack at several different points, and his forces being thus distributed in many directions, the numbers we shall have to face at any given point will be proportionately few, for should the enemy strengthen his van, he will weaken his rear. Should he strengthen his rear, he will weaken his van. Should he strengthen his left, he will weaken his right. Should he strengthen his right, he will weaken his left. If he sends reinforcements everywhere, he will everywhere be weak. numerical weakness comes from having to prepare against possible attacks, numerical strength from compelling our adversary to make these preparations against us. Knowing the place and the time of the coming battle, we may concentrate from the greatest distances in order to fight. But if neither time nor place be known, then the left wing will be impotent to sucker the right, the right equally impotent to sucker the left, the van unable to relieve the rear, or the rear to support the van. How much more so if the furthest portions of the army are anything under a hundred Lee apart, and even the nearest are separated by several Lee? Though according to my estimates the soldiers of Yue exceed our own in number, that shall advantage them nothing in the matter of victory. I say then that victory can be achieved. Though the enemy be stronger in numbers, we may prevent him from fighting, scheme so as to discover his plans and the likelihood of their success, rouse him and learn the principle of his activity or inactivity, force him to reveal himself so as to find out his vulnerable spots. Carefully compare the opposing army with your own, so that you may know where strength is super abundant and where it is deficient. In making tactical dispositions the highest pitch you can attain is to conceal them. Conceal your dispositions, and you will be safe from the prying of the subtlest spies from the machinations of the wisest brains. How victory may be produced for them out of the enemy's own tactics, that is what the multitude cannot comprehend. All men can see the tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved. Do not repeat the tactics which have gained you one victory, but let your methods be regulated by the infinite variety of circumstances. Military tactics are like unto water, for water in its natural course runs away from high places and hastens downwards. So in war the way is to avoid what is strong and to strike at what is weak. Water shapes its course according to the nature of the ground over which it flows. The soldier works out his victory in relation to the foe whom he is facing. Therefore, just as water retains no constant shape, so in warfare there are no constant conditions. He who can modify his tactics in relation to his opponent, and thereby succeed in winning, may be called a heaven-born captain. The five elements, water, fire, wood, metal, earth, are not always equally predominant. The four seasons make way for each other in turn. There are short days and long, the moon has its periods of waning and waxing. Chapter 7 Maneuvering In war the general receives his commands from the sovereign. Having collected an army and concentrated his forces, he must blend and harmonize the different elements thereof before pitching his camp. After that comes tactical maneuvering than which there is nothing more difficult. The difficulty of tactical maneuvering consists in turning the devious into the direct, and the misfortune into gain. Thus, to take a long and circuitous route after enticing the enemy out of the way, and though starting after him, to contrive to reach the goal before him, shows knowledge of the artifice of deviation. Maneuvering with an army is advantageous, with an undisciplined multitude most dangerous. If you set a fully-equipped army in march in order to snatch an advantage, the chances are that you will be too late. On the other hand, to detach a flying column for the purpose involves the sacrifice of its baggage and stores. Thus, if you order your men to roll up their buff coats and make forced marches without halting day or night, covering double the usual distance at a stretch, doing a hundred lee in order to rest an advantage, the leaders of all your three divisions will fall into the hands of the enemy. The stronger men will be in front, the jaded ones will fall behind, and on this plan only one-tenth of your army will reach its destination. If you march fifty lee in order to outmaneuver the enemy, you will lose the leader of your first division, and only half your force will reach the goal. If you march thirty lee with the same object, two-thirds of your army will arrive. We may take it, then, that an army without its baggage train is lost, without provisions it is lost, without basis of supply it is lost. We cannot enter into alliances until we are equated with the designs of our neighbours. We are not fit to lead an army on the march unless we are familiar with the face of the country, its mountains and forests, its pitfalls and precipices, its marshes and swamps. We shall be unable to turn natural advantage to account unless we make use of local guides. In war practice dissimulation and you will succeed, whether to concentrate or to divide your troops must be decided by circumstances. Let your rapidity be that of the wind, your compactness that of the forest. In raiding and plundering be like fire, in immovability, like a mountain.  When you plunder a countryside let the spoil be divided amongst your men, when you capture new territory cut it up into allotments for the benefit of the soldiery. Ponder and deliberate before you make a move. He will conquer who has lured the artifice of deviation. Such is the art of manoeuvring. The Book of Army Management says, On the field of battle the spoken word does not carry far enough, hence the institution of gongs and drums, nor can ordinary objects be seen clearly enough, hence the institution of banners and flags. Gongs and drums, banners and flags, are means whereby the ears and eyes of the host may be focused on one particular point. The host thus forming a single united body, it is impossible either for the brave to advance alone or for the cowardly to retreat alone. This is the art of handling large masses of men. In night fighting, then, make much use of signal fires and drums, and in fighting by day, of flags and banners as a means of influencing the ears and eyes of your army. A whole army may be robbed of its spirit, a commander-in-chief may be robbed of his presence of mind. Now, a soldier's spirit is keenest in the morning. By noon day it has begun to flag, and in the evening his mind is bent only on returning to camp. A clever general therefore avoids an army when its spirit is keen, but attacks it when it is sluggish and inclined to return. This is the art of studying moods. Discipline and calm, to await the appearance of disorder and hubbub amongst the enemy. This is the art of retaining self-possession. To be near the goal while the enemy is still far from it, to wait at ease while the enemy is toiling and struggling, to be well-fed while the enemy is famished, this is the art of husbanding one's strength. To refrain from intercepting an enemy whose banners are in perfect order, to refrain from attacking an army drawn up in calm and confident array, this is the art of studying circumstances. It is a military axiom not to advance uphill against the enemy, nor to oppose him when he comes downhill. Do not pursue an enemy who simulates flight. Do not attack soldiers whose temper is keen. Do not swallow bait offered by the enemy. Do not interfere with an army that is returning home. When you surround an army, leave an outlet free. Do not press a desperate foe too hard. Such is the art of warfare. Chapter 8 Variation in Tactics In war the general receives his commands from the sovereign, collects his army, and concentrates his forces. When in difficult country, do not encamp. In country where high roads intersect, join hands with your allies. Do not linger in dangerously isolated positions. In hemmed-in situations you must resort to stratagem. In desperate position you must fight. There are roads which must not be followed, armies which must not be attacked, towns which must not be besieged, positions which must not be contested, commands of the sovereign which must not be obeyed. The general who thoroughly understands the advantages that accompany variation of tactics knows how to handle his troops. The general who does not understand these may be well acquainted with the configuration of the country, yet he will not be able to turn his knowledge to practical account. So the student of war who is unversed in the art of war of varying his plans, even though he be acquainted with the five advantages, will fail to make the best use of his men. Hence in the wise leader's plans considerations of advantage and of disadvantage will be blended together. If our expectation of advantage be tempered in this way, we may succeed in accomplishing the essential part of our schemes. If, on the other hand, in the midst of difficulties we are always ready to seize an advantage, we may extricate ourselves from misfortune. Reduce the hostile chiefs by inflicting damage on them and make trouble for them and keep them constantly engaged. Hold out specious allurements and make them rush to any given point. The art of war teaches us to rely not on the likelihood of the enemies not coming, but on our own readiness to receive him, not on the chance of his not attacking, but rather on the fact that we have made our position unassailable. There are five dangerous faults which may affect the general. Recklessness, which leads to destruction. Cowardness, which leads to capture. Hasty temper, which can be provoked by insults. A delicacy of honor which is sensitive to shame. Oversilicitude for his men, which exposes him to worry and trouble. These are the five besetting sins of a general, ruinous to the conduct of war. When an army is overthrown and its leader slain, the cause will surely be found among these five dangerous faults. Let them be a subject of meditation. We come now to the question of encamping the army and observing signs of the enemy. Pass quickly over mountains and keep in the neighborhood of valleys. Camp in high places, facing the sun. Do not climb heights in order to fight. So much for mountain warfare. After crossing a river, you should get far away from it. When an invading force crosses a river in its unwind march, do not advance to meet it in midstream. It will be best to let half the army get across and then deliver your attack. If you are anxious to fight, you should not go to meet the invader near a river which he has to cross. Moor your craft higher up than the enemy and facing the sun. Do not move upstream to meet the enemy. So much for river warfare. In crossing salt marshes, your sole concern should be to get over them quickly without any delay. If forced to fight in a salt marsh, you should have water and grass near you and get your back to a clump of trees. So much for operations in salt marshes. In dry level country, take up an easily accessible position with rising ground to your right and on your rear, so that the danger may be in front and safety lie behind. So much for campaigning in flat country. These are the four useful branches of military knowledge which enabled the Yellow Emperor to vanquish four several sovereigns. All armies prefer high ground to low and sunny places to dark. If you are careful of your men and camp on hard ground, the army will be free from disease of every kind and this will spell victory. When you come to a hill or a bank, occupy the sunny side with the slope on your right rear. Thus you will at once act for the benefit of your soldiers and utilize the natural advantages of the ground. When, in consequence of heavy rains up country, a river which you wish to forward is swollen and flecked with foam, you must wait until it subsides. Country in which there are precipitous cliffs with torrents running between deep natural hollows, confined places, tangled thickets, quagmires and crevices should be left with all possible speed and not approached. While we keep away from such places, we should get the enemy to approach them. While we face them, we should let the enemy have them on his rear. If in the neighborhood of your camp there should be any hilly country, ponds surrounded by aquatic grass, hollow basins filled with reeds or woods with thick undergrowth, they must be carefully routed out and searched, for these are places where men in ambush or insidious spies are likely to be lurking. When the enemy is close at hand and remains quiet, he is relying on the natural strength of his position. When he keeps aloof and tries to provoke a battle, he is anxious for the other side to advance. If his place of encampment is easy of access, he is tendering a bait. Movement amongst the trees above forest shows that the enemy is advancing. The appearance of a number of screens in the midst of thick grass means that the enemy wants to make us suspicious. The rising of birds in their flight is the sign of an ambush gate. Startled beasts indicate that a sudden attack is coming. When there is dust rising in a high column, it is the sign of chariots advancing. When the dust is low but spread over a wide area, it betokens the approach of infantry. When it branches out in different directions, it shows that parties have been sent to collect firewood. A few clouds of dust moving to and fro signify that the army is encamping. Humble words and increased preparations are signs that the enemy is about to advance. Violent language and driving forward, as if to attack, are signs that he will retreat. When the light chariots come out first and take up a position on the wings, it is a sign that the enemy is forming for battle. Peace proposals unaccompanied by a sworn covenant indicate a plot. When there is much running about and the soldiers fall into rank, it means that the critical moment has come. When some are seen advancing and some retreating, it is allure. When the soldiers stand leaning on their spears, they are faint from want of food. If those who are sent to draw water begin by drinking themselves, the army is suffering from thirst. If the enemy sees an advantage to be gained and makes no effort to secure it, the soldiers are exhausted. If birds gather on any spot, it is unoccupied. Clammer by night betokens nervousness. If there is disturbance in the camp, the general's authority is weak. If the banners and flags are shifted about, sedition is afoot. If the officers are angry, it means that the men are weary. When an army feeds its horses with grain and kills its cattle for food, and when the men do not hang their cooking pots over the campfires, showing that they will not return to their tents, you may know that they are determined to fight to the death. The sight of men whispering together in small knots or speaking in subdued tones points to disaffection amongst the rank and file. Two frequent rewards signify that the enemy is at the end of his resources. Too many punishments betray a condition of dire distress. To begin by bluster, but afterwards to take fright at the enemy's numbers, shows a supreme lack of intelligence. When envoys are set with compliments in their mouths, it is a sign that the enemy wishes for a truce. If the enemy's troops march up angrily and remain facing ours for a long time without either joining battle or taking themselves off again, the situation is one that demands great vigilance and circumspection. If our troops are no more in number than the enemy, that is angrily sufficient. It only means that no direct attack can be made. What we can do is simply to concentrate all our available strength, keep a close watch on the enemy, and obtain reinforcements. He who exercises no forethoughts but makes light of his opponents is sure to be captured by them.   Therefore, soldiers must be treated in the first instance with humanity, but kept under control by means of iron discipline. This is a certain road to victory. If, in training soldiers, commands are habitually enforced, the army will be well disciplined. If not, its discipline will be bad. If a general shows confidence in his men but always insists on his orders being obeyed, the gain will be mutual. Chapter 10 Terrain We may distinguish six kinds of terrain, to wit, accessible ground, entangling ground, temporizing ground, narrow passes, precipitous heights, positioned at a great distance from the enemy. Ground which can be freely traversed by both sides is called accessible. With regard to ground of this nature, be before the enemy in occupying the raised and sunny spots, and carefully guard your line of supplies, then you will be able to fight with advantage. Ground which can be abandoned but is hard to reoccupy is called entangling. From a position of this sort, if the enemy is unprepared, you may sally forth and defeat him, but if the enemy is prepared for your coming and you fail to defeat him, then return being impossible. Disaster will ensue. When the position is such that neither side will gain by making the first move, it is called temporizing ground. In a position of this sort, even though the enemy should offer us an attractive bait, it will be advisable not to stir forth, but rather to retreat, thus enticing the enemy in his turn. Then, when part of his army has come out, we may deliver our attack with advantage. With regard to narrow passes, if you can occupy them first, let them be strongly garrisoned and await the advent of the enemy. Should the army forestall you in occupying a pass, do not go after him if the pass is fully garrisoned, but only if it is weakly garrisoned. With regard to precipitous heights, if you are beforehand with your adversary, you should occupy the raised and sunny spots, and there wait for him to come up. If the enemy has occupied them before you, do not follow him, but retreat and try to entice him away. If you are situated at a great distance from the enemy and the strength of the two armies is equal, it is not easy to provoke a battle, and fighting will be to your disadvantage. These six are the principles connected with earth. The general who has attained a responsible post must be careful to study them. Now, the army is exposed to six several calamities, not arising from natural causes, but from faults for which the general is responsible. These are flight, insubordination, collapse, ruin, disorganization, route. Other conditions being equal, if one force is hurled against another ten times its size, the result will be the flight of the former. When the common soldiers are too strong and their officers too weak, the result is insubordination. When the officers are too strong and the common soldiers too weak, the result is collapse. When the higher officers are angry and insubordinate and on meeting the enemy give battle on their own account from a feeling of resentment before the commander-in-chief can tell whether or not he is in a position to fight, the result is ruin. When the general is weak and without authority, when his orders are not clear and distinct, when there are no fixed duties assigned to officers and men and the ranks are formed in a slovenly haphazard manner, the result is utter disorganization. One a general, unable to estimate the enemy's strength, allows an inferior force to engage a larger one or hurls a weak detachment against a powerful one and neglects to place picked soldiers in the front rank. The result must be rout. These are six ways of courting defeat which must be carefully noted by the general who has attained a responsible post. The natural formation of the country is the soldier's best ally, but a power of estimating the adversary, of controlling the forces of victory, and of shrewdly calculating difficulties, dangers, and distances constitutes the test of a great general. He who knows these things, and in fighting puts his knowledge into practice, will win his battles. He who knows them not, nor practices them, will surely be defeated. If fighting is sure to result in victory, then you must fight, even though the ruler forbid it. If fighting will not result in victory, then you must not fight, even at the ruler's bidding. The general who advances without coveting fame and retreats without fearing disgrace, whose only thought is to protect his country and do good service for his sovereign, is the jewel of the kingdom.   If, however, you are indulgent, but unable to make your authority felt kindhearted, but unable to enforce your commands, and incapable, moreover, of quelling disorder, then your soldiers must be likened to spoiled children. They are useless for any practical purpose. If we know that our own men are in a condition to attack, but are unaware that the enemy is not open to attack, we have gone only half way towards victory. If we know that the enemy is open to attack, but are unaware that our own men are not in a condition to attack, we have gone only half way towards victory. If we know that the enemy is open to attack, and also know that our men are in a condition to attack, but are unaware that the nature of the ground makes fighting impracticable, We have still gone only half-way towards victory. Hence, the experienced soldier, once in motion, is never bewildered. Once he has broken camp, he is never at a loss. Hence, the saying, If you know the enemy and know yourself, the victory will not stand in doubt. If you know heaven and know earth, you may make your victory complete." Chapter 9 The Nine Situations The art of war recognizes nine varieties of ground, dispersive ground, facile ground, contentious ground, open ground, ground of intersecting highways, serious ground, difficult ground, hemmed in ground, desperate ground. When achieved in his fighting in his own territory, it is dispersive ground. When he has penetrated into hostile territory, but to no great distance, it is facile ground. Ground, the possession of which imports great advantage to either side, is contentious ground. Ground on which each side has liberty of movement is open ground. Ground, which forms the key to three contiguous states, so that he who occupies it first has most of the empire at his command, is a ground of intersecting highways. When an army has penetrated into the heart of a hostile country, leaving a number of fortified cities in its rear, it is serious ground. Mountain forests, rugged steeps, marshes and fends, all country that is hard to traverse, this is difficult ground. Ground, which is reached through narrow gorges and from which we can only retire by tortuous paths, so that a small number of the enemy would suffice to crush a large body of our men, this is hemmed in ground. Ground on which we can only be saved from destruction by fighting without delay is desperate ground. On dispersive ground, therefore, fight not. On facile ground, halt not. On contentious ground, attack not. On open ground, do not try to block the enemy's way. On the ground of intersecting highways, join hands with your allies. On serious ground, gather in plunder. A difficult ground keeps steadily on the march. On hemmed in ground, resort to stratagem. On desperate ground, fight. Those who were called skillful leaders of old knew how to drive a wedge between the enemy's front and rear, to prevent cooperation between his large and small divisions, to hinder the good troops from rescuing the bad, the officers from rallying their men. When the enemy's men were united, they managed to keep them in disorder. When it was to their advantage, they made a forward move, when otherwise, they stopped still. If asked how to cope with a great host of the enemy in orderly array and on the point of marching to the attack, I should say, begin by seizing something which your opponent holds dear, then he will be amenable to your will. Rapidity is the essence of war. Take advantage of the enemy's unreadiness. Make your way by unexpected routes and attack unguarded spots. The following are the principles to be observed by an invading force. The further you penetrate into a country, the greater will be the solidarity of your troops, and thus the defenders will not prevail against you. Make forays into fertile country in order to supply your army with food. Carefully study the well-being of your men and do not overtax them. Concentrate your energy and hoard your strength. Keep your army continually on the move and devise unfathomable plans. Throw your soldiers into positions when there is no escape, and they will prefer death to flight. If they will face death, there is nothing they may not achieve. Officers and men alike will put forth their uttermost strength. Soldiers, when in desperate straits, lose a sense of fear. If there is no place of refuge, they will stand firm. If they are in hostile country, they will show a stubborn front. If there is no help for it, they will fight hard. Thus, without waiting to be marshaled, the soldiers will be constantly on the kivive. Without waiting to be asked, they will do your will. Without restrictions, they will be faithful. Without giving orders, they can be trusted. Prohibit the taking of omens and do away with superstitious doubts. Then, until death itself comes, no calamity need be feared. If our soldiers are not overburdened with money, it is not because they have a distaste for riches. If their lives are not unduly long, it is not because they are disinclined to longevity. On the day they are ordered out to battle, your soldiers may weep, those sitting up be doing their garments, and those lying down, letting the tears run down their cheeks. But let them once be brought to bay, and they will display the courage of a Chu or a Ku'ai. The skillful technician may be likened to the Shui John. Now, the Shui John is a snake that is found in the Chong Mountains. Strike at its head, and you will be attacked by its tail. Strike at its tail, and you will be attacked by its head. Strike at its middle, and you will be attacked by head and tail both. Asked if an army can be made to imitate the Shui John, I should answer yes. For the men of Wu and the men of Yue are enemies, yet if they are crossing a river in the same boats and are caught by a storm, they will come to each other's assistance just as the left hand helps the right. Hence, it is not enough to put one's trust in the tethering of horses and the burying of chariot wheels in the ground. The principle on which to manage an army is to set up one standard of courage which all must reach. How to make the best of both strong and weak? That is a question involving the proper use of ground. Thus, the skillful general conducts his army just as though he were leading a single man willy-nilly by the hand. It is the business of a general to be quiet and thus ensure secrecy, upright and just, and thus maintain order. He must be able to mystify his officers and men by false reports and appearances and thus keep them in total ignorance. By altering his arrangements and changing his plans, he keeps the enemy without definite knowledge. By shifting his camp and taking circuitous routes, he prevents the enemy from anticipating his purpose. At the critical moment, the leaner of an army acts like one who has climbed up a height and then kicks away the ladder behind him. He carries his men deep into hostile territory before he shows his hand. He burns his boats and breaks his cooking-pot. Like a shepherd driving a flock of sheep, he drives his men this way and that, and nothing knows whether he is going. To muster his host and bring it into danger, this may be termed the business of the general. The different measures suited to the nine varieties of ground, the expediency of aggressive or defensive tactics, and the fundamental laws of human nature, these are things that must most certainly be studied. When invading hostile territory, the general principle is that penetrating deeply brings cohesion. Penetrating but a short way means dispersion. When you leave your own country behind and take your army across the neighbourhood territory, you find yourself on critical ground. When there are means of communication on all four sides, the ground is one of interesting highways. When you penetrate deeply into a country, it is serious ground. When you penetrate but a little way, it is facile ground. When you have the enemy's strongholds on your rear and narrow passes in front, it is hemmed in ground. When there is no place of refuge at all, it is desperate ground. Therefore, on dispersive ground, I would inspire my men with unity of purpose. On facile ground, I would see that there is close connection between all parts of my army. On contentious ground, I would hurry up my rear. On open ground, I would keep a vigilant eye on my defences. On ground of interesting highways, I would consolidate my alliances. On serious ground, I would try to ensure a continuous stream of supplies. On difficult ground, I would keep pushing on along the road. On hemmed in ground, I would block any way of retreat. On desperate ground, I would proclaim to my soldiers the hopelessness of saving their lives, for it is the soldier's disposition to offer an obstinate resistance when surrounded, to fight hard when he cannot help himself, and to obey promptly when he has fallen into danger. We cannot enter into alliance with neighbouring princes until we are equated with their designs. We are not fit to lead an army on the march unless we are familiar with the face of the country, its mountains and forests, its pitfalls and precipices, its marshes and swamps. We shall be unable to turn natural advantages to account unless we make use of local guides. To be ignored of any one of the following four or five principles does not be fit a warlike prince. When a warlike prince attacks a powerful state, his generalship shows itself in preventing the concentration of the enemy's forces. He overaws his opponents, and their allies are prevented from joining against him. Hence, he does not strive to ally himself with all and sundry, nor does he foster the power of other states. He carries out his own secret designs, keeping his antagonists in awe. Thus, he is able to capture their cities and overthrow their kingdoms. Bestow rewards without regard to rule, issue orders without regard to previous arrangements, and you will be able to handle a whole army as though you had to do with but a single man. Confront your soldiers with the deed itself. Never let them know your design.  But tell them nothing when the situation is gloomy. Place your army in deadly peril, and it will survive. Plunge it into desperate straits, and it will come off in safety. For it is precisely when a force has fallen into harm's way that it is capable of striking a blow for victory. Success in warfare is gained by carefully accommodating ourselves to the enemy's purpose. By persistently hanging on the enemy's flank, we shall succeed in the long run in killing the commander-in-chief. This is called ability to accomplish a thing by sheer cunning. On the day that you take up your command, block the frontier passes, destroy the official tallies, and stop the passage of all emissaries. Be stern in the council chamber, so that you may control the situation. If the enemy leaves a door open, you must rush in. Forstall your opponents by seizing what he holds dear, and subtly contrive to time his arrival on the ground. Walk in the path defined by rule, and accommodate yourself to the enemy until you can fight a decisive battle. At first, then, exhibit the coyness of a maiden until the enemy gives you an opening. Afterwards, emulate the rapidity of a running hare, and it will be too late for the enemy to oppose you. Chapter 12 The Attack by Fire There are five ways of attacking with fire. The first is to burn soldiers in their camp. The second is to burn stores. The third is to burn baggage trains. The fourth is to burn arsenals and magazines. The fifth is to hurl dropping fire amongst the enemy. In order to carry out an attack, we must have means available. The material for raising fire should always be kept in readiness. There is a proper season for making attacks with fire, and special days for starting a conflagration. The proper season is when the weather is very dry. The special days are those when the moon is in the constellations of the sieve, the wall, the ring, or the crossbar. For these four are all days of rising wind. In attacking with fire, one should be prepared to meet five possible developments. When fire breaks out inside the enemy's camp, respond at once with an attack from without. If there is an outbreak of fire, but the enemy soldiers remain quiet, bide your time and do not attack. When the force of the flames has reached its height, follow it up with an attack, if that is practicable. If not, stay where you are. If it is possible to make an assault with fire from without, do not wait for it to break out within, but deliver your attack at a favourable moment. When you start a fire, be to windward of it. Do not attack from the leeward. A wind that rises in the daytime lasts long, but a night breeze soon falls. In every army the five developments connected with fire must be known, the movements of the stars calculated, and a watch kept for the proper days. Hence, those who use fire as an aid to the attack show intelligence. Those who use water as an aid to the attack gain an accession of strength. By means of water, an enemy may be intercepted, but not robbed of all his belongings. Unhappy is the fate of one who tries to win his battles and succeed in his attacks without cultivating the spirit of enterprise, for the result is waste of time and general stagnation. Hence, the saying, the enlightened ruler lays his plans well ahead, the good general cultivates his resources. Move knots unless you see an advantage. Use not your troops unless there is something to be gained. Fight not unless the position is critical. No ruler should put troops into the field merely to gratify his own spleen. No general should fight a battle simply out of peak. If it is to your advantage, make a forward move. If not, stay where you are. Anger may in time change to gladness. Vaccation may be succeeded by content.  Hence, the enlightened ruler is heedful and the good general full of caution. This is the way to keep a country at peace and an army intact. Chapter 13 The Use of Spies Raising a host of a hundred thousand men and marching them great distances entails heavy loss on the people and a drain on the resources of the state. The daily expenditure will amount to a thousand ounces of silver. There will be commotion at home and abroad, and men will drop down exhausted on the highways, as many as seven hundred thousand families will be impeded in their labor. Hostile armies may face each other for years, striving for the victory which is decided in a single day. This being so, to remain in ignorance of the enemy's condition simply because one grudges the outlay of a hundred ounces of silver in honors and emoluments is the height of inhumanity. One who acts thus is no leader of men, no present help to his sovereign, no master of victory. Thus, what enables the wise sovereign and the good general to strike and conquer and achieve things beyond the reach of ordinary men is foreknowledge. Now this foreknowledge cannot be elicited from spirits, it cannot be obtained inductively from experience nor by any deductive calculation. Knowledge of the enemy's dispositions can only be obtained from other men, hence the use of spies, of whom there are five classes, local spies, inward spies, converted spies, doomed spies, surviving spies. When these five kinds of spy are all at work, none can discover the secret system. This is called divine manipulation of the threads. It is the sovereign's most precious faculty. Having local spies means employing the services of the inhabitants of a district, having inward spies making use of officials of the enemy, having converted spies, getting hold of the enemy's spies and using them for your own purposes, having doomed spies doing certain things openly for purposes of deception and allowing our spies to know of them and report them to the enemy. Surviving spies, finally, are those who bring back news from the enemy's camp. Hence it is that with none in the whole army are more intimate relations to be maintained than with spies. None should be more liberally rewarded, in no other business should greater secrecy be preserved. Spies cannot be usefully employed without a certain intuitive sagacity, they cannot be properly managed without benevolence and straightforwardness. Without subtle ingenuity of mind one cannot make certain of the truth of their reports. Be subtle, use your spies for every kind of business.  Whether the object be to crush an army, to storm a city, or to assassinate an individual, it is always necessary to begin by finding out the names of the attendants, the aged camp, and doorkeepers and sentries of the general in command. Our spies must be commissioned to ascertain these. The enemy's spies who have come to spy on us must be sought out, tempted with bribes, led away, and comfortably housed. Thus they will become converted spies and available for our service. It is through the information brought by the converted spy that we are able to acquire and employ local and inward spies. It is owing to his information again that we can cause the doomed spy to carry false tidings to the enemy. Lastly, it is by his information that the surviving spy can be used on appointed occasions. The end and aim of spying in all its five varieties is knowledge of the enemy, and this knowledge can only be derived in the first instance from the converted spy. Hence it is essential that the converted spy be treated with the utmost liberality. Of old, the rise of the Yin dynasty was due to Yi Qi, who has served under Xiziya. Likewise, the rise of the Chao dynasty was due to Lu Ya, who has served under the Yin. Hence it is only the enlightened ruler and the wise general who will use the highest intelligence of the army for purposes of spying, and thereby they achieve great results. Spies are a most important element in water, because on them depends an army's ability to move. End of The Art of War by Sun Tzu.


Merci et n'hésitez pas à poser des questions lors de ma présentation, si vous voulez, bien sûr. Je vais présenter mes activités de recherche depuis les six ou sept ans, je ne l'ai pas remarqué exactement. Il y a des systèmes de recommandation et je vais discuter un peu sur les analyses de métal. Juste un petit coup de colère, mais je vais expliquer ce qu'il y a à ce moment. Oui, j'ai fait mes thésies sur l'Université de Tour, précisément sur une belle ville, c'est Blois, 60 000 habitants avec beaucoup de casseurs etc. Et après ça, j'ai performé une position postdoc pour l'Université de Nantes, et j'ai obtenu ma position, la position de professeur de l'Université de Toulouse, sur le Lab de l'Hirith. Plus précisément, ma PhD a été focussée sur la recommandation de la recommandation de l'Université de Toulouse où j'ai proposé un système de recommandation basé sur la compétition de l'Université de Toulouse, je vais entrer dans les détails de cette présentation. Et j'ai aussi proposé un outil de soutenir la composition de la session de l'Université de Toulouse, incluant les fonctions de l'Université de Toulouse, que je vais aussi détailler ici, dans cette présentation. Durant ma position postdoc, j'ai été focussé sur la compétition de l'Université de Toulouse, et j'ai appris sur un objectif culturel et sur les recommandations de l'Université de Toulouse. Et maintenant, j'ai travaillé sur les systèmes de recommandation de la recommandation de l'Université de Toulouse et les mesures de qualité dans les recommandations. Donc, ce sont des petits papiers que j'ai évoqués, des journalistes spécifiques, des chefs de boulot, des conférences internationales, des workshops, des conférences nationales, etc. Et j'ai aussi, c'est vraiment un plaisir pour moi, d'être un membre de l'Université de Toulouse, ce qui est un fameux workshop sur les systèmes de l'Université de Toulouse, et d'actuellement plus dans les approches de Big Data. Donc, sur les systèmes de recommandation de l'Université de Toulouse, dans le contexte de l'Université de Toulouse. Donc, supposons un utilisateur qui veut interrompre avec plusieurs applications, et qu'on puisse aussi configurer un nouveau car dans un web site. Donc, bien sûr, c'est un joke ici, c'est un renou, un car. Mais on peut imaginer un web site où on veut configurer un nouveau car sur le web site, ou analyser des cubes de données ou acheter quelque chose dans un web site, ou acheter des données au format de Big Data. Le problème est que, dans ce cas, un utilisateur, ok, après plusieurs heures, ou après plusieurs minutes, ce utilisateur peut être confusé. Pourquoi ? Parce que, pour exemple, dans le cas de configuration de car, je ne sais pas si vous avez déjà utilisé ça, mais généralement, ça peut être difficile si vous n'avez pas en mind la façon de comment le web site fonctionne pour configurer un nouveau car. C'est difficile si vous n'avez pas la possibilité d'avoir des propositions de ce web site. Ça peut être appliqué avec la même chose quand nous voulons analyser des cubes de données ou acheter quelque chose dans les web sites, ou acheter des données de Big Data. C'est pourquoi, afin d'améliorer et d'améliorer l'accès à l'information, nous proposons généralement un système scientifique qui propose la personnalisation ou la recommandation pour ce fameux utilisateur confusé. Personnalisation, généralement, pour modifier l'action que le utilisateur fait, mais juste, ok, modifier, mais, afin d'être plus près à l'expectation de cet utilisateur. La recommandation est plus pour proposer les actions de cet utilisateur. C'est important, ces différences entre personnalisation et recommandation. Et, de la littérature, nous basons le système scientifique sur ce que nous appelons « collaborative filtering approaches » où l'information de l'ancien utilisateur qui a des actions dans le passé, et qui ont été utilisées pour recommandation de nouvelles actions à l'aide d'une action curante de l'utilisateur. Donc, juste pour détenir les détails de ce contexte, parce que le système recommandateur est proposé dans cet contexte, j'ai besoin de proposer un modèle multi-démotionnel pour travailler avec cela. C'est-à-dire, pour exemple, les hierarchies dans les cubes de données, pour exemple, si nous voulons focusser sur ces données, nous avons besoin, pour exemple, 1, 2, 3, 4, 5 dimensions comme résidence, race, temps, sexe, occupation et où les niveaux, pour exemple, toute la ville, région, state et la ville sont organisés dans les hierarchies. Bien sûr, parce que nous voulons analyser un cube. Nous avons besoin de mesures pour analyser, quand nous avons analysé les dimensions, pour exemple, dans une table de course nous avons besoin de mesures, nous avons besoin de valeurs pour analyser. C'est pourquoi nous avons besoin de mesures comme income, gaz, de l'eau, si nous voulons analyser les gens j'ai aussi basé mon travail sur une définition précise qui peut être considérée comme une définition basée mais cette définition qui peut être considérée comme la main qui est possible de faire dans un cube de données donc nous considérons un set de groupes qui est lié entre les niveaux de différentes hierarchies que nous définissons ici, un certain set où nous allons définir plus les valeurs que nous voulons focuser selon le set de groupes et, bien sûr, le set de mesures. Nous allons aussi considérer une définition basée que c'est juste une séquence de clés, ok? Et mon problème lors de mon travail c'était comment réaliser ce problème particulier qui est le contexte de Holap mais aussi considérée comme une façon efficace pour la recommandation. Donc l'originalité de mon système était pour proposer des séquences de clés, pourquoi? Parce que, en général, depuis la littérature, nous proposons, le système recommandé n'est pas un clés ou généralement une partie de clés mais ce n'est pas si sympa d'avoir une vue générale de ce que les réserves ont fait dans le passé. C'est pourquoi je propose des séquences par le système recommandé plutôt que de clés. Et je base mon système sur une expression clés plutôt qu'un résultat clés Pourquoi? Parce que, juste considérant ce que l'utilise est typant est plus efficace pour considérer les résultats, les valeurs donc la compétition de la courbe dans le database que la courbe expression donc pour des consens efficaces. Mon système est proposé dans trois phases successives nous faisons la première phase où nous allons essayer d'aligner la session de courbe la session de courbe ce que l'utilise est faisant la session n'est pas finie et nous allons essayer d'aligner cette session avec toutes les sessions dans le passé, donc produite par d'autres utilisateurs dans le passé une phase de ralenti où nous allons considérer les résultats de la première phase et nous allons essayer de ralentir les sessions intéressantes et après une phase de ralenti où nous allons essayer d'adapter la session obtenue par la meilleure phase au contexte de l'utilise de courbe je veux dire, nous allons essayer de modifier la recommandation que nous avons obtenue ici pour être plus proche de la session de courbe ce n'est pas le commun dans les systèmes de recommandation pour être plus précis avec chaque phase la phase de ralenti c'est comme ça donc nous considérons la session de courbe peut-être que je vais essayer avec le pointeur nous avons ici la session de courbe en gris nous avons la courbe courbe donc l'utilise a fait cette courbe mais il essaie de obtenir une nouvelle courbe en gris en gris vous avez les sessions de courbe et l'idée est d'aligner de trouver un moyen d'aligner la fin de la session de courbe avec le début des sessions de courbe afin d'extraire à l'aliment de trouver un futur potentiel pour le recommandation ok donc cette partie sera le candidat potentiel pour la recommandation selon ce non, non, peut-être pour plus de précision ici pour trouver l'aliment nous avons utilisé un majeur de la majeure de la similarité de la majeure classique d'informations et de retrieval le premier était entre la courbe courbe nous proposons une similarité entre la courbe courbe basée sur l'expression bien sûr c'est l'équivalent si vous êtes à l'aise pour le format d'aliment donc goût sélection et joint, oui, joint et projection each one evaluated by a specific measure so if you remember a courbe is composed with a goodbye set a selection set and a measure set we will apply one measure per type of format of the query for each of the 3 elements of the query but the more interesting similarity measure is between sequences of queries we propose possible possible measure that we have we had in mind for instance the dice coefficient a distance alignment of sub sequences and we ask to real users to validate our approaches according to this different similarity measures and the more interesting similarity measure between sequences and also validated with user test while the alignment of sub sequences alignment of sub sequences implementing by the extension of the algorithm of Smith-Waterman is really known in the biological context where we want to align DNA sequences we finally just we take the same approaches here in order to have a maximal similarity where we have a perfect alignment between 2 sessions a good alignment and so a good similarity when we have for instance a possible gap between one of the 2 sessions to compare a very low similarity where we have a very bad alignment for instance here completing the contrary of the sequence and of course minimal similarity so zero when we have no alignment between 2 sessions in order to have the case where we want to align how can I say a same when you want to align yes to affect a more important weight to the alignment for the end queries of the sessions we applied a gap penalty where we will score finally each queries to obtain this type of things when we want to to measure the sequences finally and we have the representation of the gap penalty where we obtain discontent function so according to the sessions that we obtain with the alignment phase we will have to rank these sessions between them this potential future here between them to do this we will apply weights on each query that are the most representative for instance here in red the queries are really similar each query is really similar to what we can find in the logs so finally we will apply a more weight for these queries we will also apply a sort of average of score between all these scores of queries and we will just take the best session that we obtain according to this phase and so in the third phase we apply so the fitting phase where we will try to be more close to what the user is doing so for instance here we have the best session that we obtain in the previous phase and we will try just to be close to what the user is doing the idea here is really simple we will just try to modify part of fragments of the recommendation here so for instance and we will apply two types of rules each rules is not so nice because we just name these rules of type 1 so we have here the current session here the session of the log and here the part of the recommendation that we will try to fit the idea is to extract association rules I don't know if you are aware with this but the idea is to compose transaction between one query of the session and one query of the log session according of course on the alignment that we found here if you remember with the similarity measure and Smith-Wetterman algorithm and the idea here is just to find some frequencies of fragments that we find between the current session and the log session in order to have in the body of the rule a fragment of the log session and on the head of the rule a fragment of the current session why? because thanks to this type of rules we will able to modify the the fragment that we have here by the fragment that we have in the head of the rules for instance here 2005 is just replaced by 2002 we see in the current session we are clearly in the recommendation part closer to what the user is doing ok? we are here just focus on the year 2002 before we was focused on 2005 and we apply also the pretty same types of things with rules of type 2 but just here considering 1 transaction 1 query per transaction of the current session it means that we want here just to identify some regularities that are identified clearly in the current session for instance here and yes yes for instance we will so using this transaction we will extract all the types of association the rules that we can and if the rule matches with the recommendation for instance we have the context of year 2002 it matches with this context we will add the fragments that we have in the head of the rules for instance here average income and here also we clearly identify that this recommendation is closer to this current session and we have produced something that seems more natural for the user considering the fragment 2002 and average income for the user whereas before maybe not so not so evident for the user to use this type of recommendation of course it's nice to propose a recommender system it's nice to propose sequence of queries but it is also nice if we are able to propose some quality measures between the recommendation and I tried to recommend some quality measures for recommendations where really the tradeoff is between something that is from a first pass provides some novelty to the user because the user is analyzing a data cube so he has to be he wants to analyze so the recommender the recommender system has to provide some new new fragments new queries to this user so he has to have some noble things to do but he wants also to be well adapted to what the user is doing that is why I also propose a measure that can estimate the adaptation of the queries we commanded or the sequence of queries we commanded to the current user so here a nobility whose recommendation provides new elements informative from the logs and adaptation preserving consistency with the current session yes so it is well to propose a recommender system but it is well if we can really see how the recommender system can be used by users and that is why I propose a tool to assist a user for all up query and session composition this tool is composed of three types of functions holistic functions such as of course the recommender system suggesting queries to the user a system also of log summary I will enter in the details just after in order to overcome the cold start problem that is well known in recommender system just the cold start problem is when we have not past sessions where the system is begin it is impossible to recommend some things so that is why we propose a log summary approach and also a graphical user interface for the query composition so facilitating query addition so about query composition the idea is to reuse the DFM approach proposed by Matteo Golfarelli and Stefano Rizzi I don't remember the year but it is a famous schema for defining data cube and we just reuse this type of thing to construct a query the idea is to when we want to obtain a group by set just to link the levels between them when we want a selection we have just to click on a level to specify the value and we have a selection and when we want to specify a measure we have just to click here in the measure part and add the measure that you want for instance I can obtain here the query average income for each region between 2000 and 2001 for women it is this type of query is possible if we want also focused on census data about log summary and log visualization so in order to overcome the problem of call start in recombinative system the logs, the past actions are presented in a summarized view the idea to consider all the sessions of the log in this part the idea is to summarize the sessions between them in order to have consist representation of what we have in the logs just to facilitate the navigation and the view of what it exists in the log and for instance in order to reuse sessions or queries that are presented in the logs the hierarchical clustering of the log for instance here we try to represent all these four sessions using three clusters composed of for instance the first two sessions of the log, four sessions and ten sessions and because we want also to navigate between the sessions we proposed splitting operation for instance we can click on a cluster and when we click on the cluster we have the subdivision in two other clusters composed of seven sessions and three sessions so the sum is ten in order to navigate in the hierarchy and in order also to obtain a potential interesting session or query of course yes because and we know that a log can be composed with many queries or sessions several maybe hundred or thousands queries of more sessions we offer also the possibility to the user to filter the log according to one query for instance I want all the sessions on the log that includes the query sex female year 2001 and the major average income where the system will compute another view of what it exists in the logs considering only this query for instance we have just here three sessions that are represented we offer also the possibility to filter the log not just only using a similar query but a similar session so the user is doing a session and we will try to find just the sessions on the log that are similar to the session that the user is doing and of course we also propose in this system the recommender system that I where I detail the things just before so for instance we have an example of recommended session according to what the user is doing here the current session being here a common problem with recommender system is to test the recommender system and even more the tool that I propose here with real users it's really a problem it's really common it's really difficult that's why we call to master students to answer to different questionnaires different questions in order to obtain some logs that we will use to test our system if the system works and if the system is able to recommend real event recommendations but the problem is that master students may be not so expert with all app systems and that is why we just ask to the students to use the query composition tool so without using recommender system and without using log browsing why? because we decided to compare the efficiency of master students with it's a joke monkeys I mean using naive algorithm the idea being if we are able to recommend to propose recommendations that are more efficient than naive algorithm could be if the students are able to do more efficient sessions than our naive algorithms could be algorithms just use the holistic functions so using the recommender system and the log browsing answering to exactly the same question that we ask to the students and we also finally obtain some logs and we just after that compare the logs between them by applying recall and precision measures between the same set of sessions answering to the same question and of course the good thing is that our system seems work well in terms of precision so our recommender system is really precise compared to naive algorithms are able to do the problem is about recall but recall is really simple to when we want to obtain a high recall it's really simple in this case because we have just to to how can I say to execute our naive algorithms in an infinite time in order to obtain a maximal recall here so now the part 2 it's okay for the first part now maybe because you are from Beichler or master degree sorry both yes so it's really we are really in research with recommender system so it can be difficult but I can retake this example because we have a current session where the user is doing a drill down between the levels of cities so for instance you want to have in a first query a general view of all cities considering of course data considering census data and we will answer more for Q's view on the region and state he once analyzed on 2002 and he tries different types of measures and according to log session that we found with alignment phase we we found a nice log session aligned with the end of the current sessions with the beginning of the log session so these 4 queries are aligned between them and after that we extract this part that will be the recommendations and we will try to modify this recommendation according to the 2 types of rules that I explain where we will extract association rules you know what these association rules association rules or frequent patterns are well known in databases where we want to extract frequencies of associations between data that we have, that you have in a database I don't remember the paper but I think it is in the 90's during the 90's years and according to the association rules we extract we are able to modify the recommendations to be closer to what the user is doing you see for the evaluation no because the best way is just to to find real users and experts that we will use this type of system but the problem is that I finish my PhD and I have to to work with postdoc position in another domain so actually it is not I do not continue this type of thing but I will deep learning what do you mean for every commander system yes why not it could be applied of course we have for instance no renal network but the renal network has to be of course defined but yes of course it's possible so it's okay maybe it will be more 10 minutes oh ok ah ok so maybe I will try to to speak about the third part that are my current works the idea is pretty the same that in my thesis here we consider for instance to an analyst that is Dr Flo that we want she wants to analyze flowers and Dr Cactus that we want to analyze cactus a lot of cactus and different types of cactus and every guys have a lot of information on flowers and cactus but the problem is that the Dr Flo so she is an expert on flowers but she has not the way to analyze correctly the data but Dr Cactus has this and the idea is how to to use the information computer sciences that this guy has to be used by the Dr Flo the idea is is to propose a recommender system in three phases where we will try according to a current data set that a user wants to analyze and where he has expectation of results to find some similar data sets on the past so for instance realized by Dr Cactus and here we have Dr Flo and so when we identify similar data sets we will try to identify workflows done in the past that could match with the data sets according to the expectations that the user wants and according to this we will recommend the best workflows so in terms of that matches with the best past data sets and the best indicators that maximizing what the user wants I will not enter in the details of workflow definitions but here it is what I did it is what I so we have said the system recommends workflows from past analysis according to their relevance related to performance indicators we have three steps the system has ratified the past data sets which are the most similar to the current data set the related workflows are selected and executed on the current data set and the workflow maximizing the indicators are recommended to the current user so for instance the Dr Flo yes maybe no just to know that we have also of course our system is the best to compare to other approaches here but just to have a focus of what I plan for the next years maybe 3 years or maybe more is to define criteria for analysis quality it's really a problem in research is how to estimate the relevance of analysis that can be recommended for instance how to appropriate a recommendation by user it's also a real problem in research and how to indicate to the user the relevance of a recommended analysis in the simplest possible way that is why maybe proposed during my thesis a tool to facilitate the life of the expert for instance also adapt the recommendations to the context of the user so how to handle the workflow maybe by modifying it and in order to respect at the best the user wishes so we are also in the user interest that we call the recommender system as a user-centric system and also exploring past analysis processing so offering the possibility to a user to navigate between the workflows for instance but the questions are how to represent them to the user for instance by a graphical interface and also to offer the possibility to query the workflows so just by filtering them according to what the user here wants so maybe I will finish here so merci beaucoup and thank you but maybe a bit difficult yeah I understand recommender system it's a bit hard to do this in a simple way but what you have in mind is just the three things that you have the recommender propose a sequence of queries in order to have a general view of what it exists in the past so not just one query propose to the user but really a view by sequence and also so yes so it's the first thing the other is to use similarity measure when we want to recommend something according to what the user is doing and what it exists in the log and the third is to able to be closer to what the user wants and what the user is doing when he wants to fit recommendation and so by modifying some parts of recommendations to the context of the user the context is really important in recommendation the profile of the user is really important it's the recommender system has really to be user centric it's really important Is it possible to say some example later? Yes of course I will try Yes Yes Of course Yes Yes Yes Yes Yes Thank you Thank you Thank you


Hey, what's going on guys? RudeLinL here bringing you back with another Python tutorial. Let's not waste any time Let's just hop right in the idle and get frackin. I'm gonna create a new program here called this file.python Get our get to start typing our our skeleton code Python not pytho. Okay, let's create a class. I'm just gonna use a base for my class name Define a constructor, pass in self Pass for now, and then we'll test if this is the current script. I screwed up my bracket All right, and then we'll do root Is equal to base All right now Today we're gonna be working with the power function are also known as the the POW Let's see. I'll show you. It's more of a mathematical thing. It'll raise the current raise what you pass to it to The current power that you've set it to so if we if we print out POW We can check out here Two to the power of four. How about that? We run it we get 16 because Two times two Two times two is equal four Two times two times two. It's equal to eight two times two Time to edit it. How many twos we have here times two is gonna equal 16 and then we have Because then we have four one two three four. That's how many twos we have here It's raised to the power of two. I'm sorry raise the power of four because this is raised to the power of Two because we have two twos This one is raised to the power of three This one is raised to the power of four. So that makes perfect sense. So let's try and recreate this all on our own We're gonna want to define a new function. Let's call this power We'll do self and we'll do base and then power Because we're obviously gonna need two arguments here So let's let's do what we need to do first of all We're gonna test whether the power is equal to zero because if it is remember you'd normally you would return Or at least you would get the answer of zero. So we're just gonna return one I'm sorry where you get the answer of one in all case all return zero. So Let's start going here now Let's do I in the range of one because we want to start counting at one and then all the way to the power We're gonna need to do here is set a product variable because this is where we're going to be able to keep track of our Multiplications so a product is going to equal base off the bat And we get in our our code our code block anyway for the for the for loop we can set up Product is going to equal the multiplied version of base And when we're done looping we can just return the product So every time we go through this iteration we're multiplying it by base again and again and again So let's try it if we had If we ran anyway, if we can print out what we get the product of the what at least what we get returned the information That we find we can get we can power We can change this to let's say two and two We run this we get four if we do two and three we get a we get eight Okay, so we did this to four we get sixteen just like we did that first time So here you guys can see how the power function works if you if you keep multiplying it by whatever you had originally It'll keep going and going and going if you do two to the power of one. It's just two We can change this to whatever we want. Let's do one of the power. I'll tend to the power of four There you go So there's your function people. I hope you enjoy it's it's pretty simple I mean once you get the basis of the idea that you just repeatedly multiply Whatever you're looping through and then you have your power function I hope you guys enjoyed this and I will see you guys in the next tutorial


As we discussed in our previous module that h t is a total height of a fermenter and l is the height of the working volume. So, while designing the body of a fermenter, so we should know different aspects because while talking about the 13 basic characteristics of a fermenter, so in those characteristics one character was that when we design a fermenter that should have identical geometrical shape. So, that is why that can facilitate the optimization process when we go from the lab scale to pilot scale and then to industrial scale. So, if these there is any identity or a similarity in geometrical shapes from the lab scale to pilot scale and then pilot scale to industrial scale then there will be a very easy to optimize the process and to control the process. As we have already seen that h is the total height of a fermenter and l is the height of the working volume, so just one more point that p is the width of the impeller. So, you can see here that schematic representation of a fermenter with one impeller having multi-blade mean sometimes there is a one impeller having three blades, four blades, six blades just like that when there is a ceiling fan having a three blades, sometimes we have a pedestal fan that have a four blades, so by the same case in fermenter impellers having different kind of the blades depending upon the type of the impellers. We will study in detail the different type of impellers later on, but here in this slide you can see that how a fermenter can be having a different dimensions and the parts, here you can see that baffles, so that is a drain point here and this is the d mean the diameter of a fermenter. So, if we know that H, L, P and D then before designing a fermenter in literature if we want to design a fermenter having single impellers then in the literature there are four three different models are reported, one model is reported by Steele and Maxon 1961 and the second that was reported by Wagerich and Sherton in 1963 and third that was very famous that is the fermenter with single impeller reported by Blackbarrow 1967. So, according to these three models they mentioned different geometrical ratios, you can see the operating volume, liquid height, the ratio between liquid height and the diameter very critical and then the impeller diameter and the diameter, so what will be the ratio of the impeller width and to the total diameter of the fermenter and by this ratio we can design the baffle width and then by the impeller height that this is basically that the height of the impeller from the base. So, these are the different ratios, so suppose if we want to design a 300 liter fermenter keep in mind the dimensions given by Steele and Maxon 1961 we can follow these lines. So, if we want to design a fermenter with a single impeller with keeping in mind and the Schetter, Wagerich and Schetter then we can use these the same the Blackbarrow is very critical because that given that has given the impeller height and d ratio, so that is 0.33. So, by using these geometrical ratio we can design any fermenter having single impeller. So, when we want to design a fermenter we have to calculate in detail that what is the total volume of the fermenter, so it is a very geometrical formulas. So, in case of this it is a very easy because if a fermenter is in a such shape we can just by using this formula v is equal to pi r square h by this formula we can calculate the total volume of that shape. But we know that sometime there is a long at a dome shape upper plate is not straight that is dome shape. So, in order to calculate the volume of the dome either on upper plate either but the round bottom then we have to follow this formula that v is equal to pi h over 6 into 3 a square plus h square. As you can see that h is basically the height of the dome and a is the distance of the periphery from the center. Sometimes it h and a are equal to r but all the time the h and the a are not equal to r. So, if we know the h and a of a fermenter then we can calculate the dome shape and the round bottom and then by plus in this addition of this two volumes we can have the calculations of the total volume of a fermenter vessel.