Skip to content
TORNLIFE More

Torn City Algorithms

Started by SharpMid [1833276] on in Technology.

60 replies · 659 views · thread synced · 4 days ago · View on torn.com
About this thread

Posts archived: 61 / 61 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
61
Discussion span
→
Authority score
26 / 100
Historical score
23 / 100
Story score
47 / 100
Engagement score
76 / 100

People posting, likes and official posts are not counted for this thread yet: on threads longer than one page they come from a periodic pass over the archive, which has not covered it.

Most-liked replies

SharpMid [1833276]

Torn City is produced with many different algorithms in mind. There are algorithms that decides the outcome of fights, algorithms that decides if you OD or not, etc.. I think we should all take some time and appreciate all the algorithms behind the game that we all play. We will do this through learning some more about them.

1. Introduction


This text will handle what algorithms is and why they are important within computer science. Weight will be put on how algorithms are compared by comparing their time-complexity through Big-O notation.

1.1 Background


Algorithms within computer science has a big impact of how effective data is handled which determines how well an application is run. Today companies that develops big services use algorithms to take care of tasks like searching, encryption, sorting or mathematic calculations, all optimized to go as fast as possible for the end user[1]. First step to understand why it is so important to know of algorithms is to define what an algorithm is. Acording to a popular textbook Introduction to Algorithms "an algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value or set of values as output"[2, pp.5], with other words: an algorithm is a sequence of well-defined instructions to accept one or many "in-values" and produce one or many "out-values" as output.
The complexity of an algorithm is determined by the cost of the algorithm to be performed and solves the problem measured in, for example, driving time or storage depending on which device is relevant to that particular algorithm. All operations that the computer needs to perform takes time and when a program based on large calculations or need repetitive operations to process data, optimal solutions are needed to get the user results as quickly as possible. Problems arise when computer hardware affects how quickly different operations are performed. Processors may have different priorities or ways to process operations or calculations and the death penalty will be calculated as the fastest or best. To make it easier, you use the computer science Big-O to describe how the algorithm responds to changes in the size of the on-value. The default is to measure the accuracy of the effects of the algorithm. It only handles the algorithmsasymptoticallyabetended.v.shursnapfunctions.subjects. An algorithm whose complexity according to Big-O should be more effective, it is not anyway.

1.2 Purpose and questions


The purpose of this textis to describe the importance of knowledge in algorithms and how algorithms relate to computer science. The report will also address a theoretical way of comparing algorithms with each other. The report will answer the following questions.
  • Why are algorithms important in computer science?
  • What is Ordo (Big-O) good for?
  • How to apply Ordo to its own code to control time complexity?

2. Result

Here are the results of collected information and literature that have been investigated. First, the report deals with why it is important to understand and learn about algorithms such as computer scientists. Then, Big-O describes how to compare algorithms in terms of how they respond to different sizes of input data. The report ends with deciding how to apply Big-O or calculate the complexity of the program code.

2.1 Algorithms


Data detectors sooner or later encounter algorithms, and then it may be good to have prior knowledge of the subject. Just like the definition of an algorithm, the purpose of a computer program is to solve a problem. With algorithmic thinking, problem solving becomes an easier task, which facilitates the process of working for a data browser, as a better understanding of how problems are analyzed and solved. [3] .Algoritmer-Value-Value Utility Programmers, as programs can be streamlined using them [3]. The word algorithm comes from the English word "algorithm" derived from the Latin word "algorithm" [4]. Originally, the word algorithm began to describe procedures and solve mathematical problems, which then became the definition of an algorithm. In computer science, algorithms are used to process data efficiently, common problems where algorithms facilitate work can be sorting data or searching in a variety of data.

As data network, the value-added value developer software requires understanding of the algorithms in order to properly implement them. When essential parts of programs are created, it is likely that driving time will be tested and then it is important to correctly implement the correct algorithm. When an analysis of driving time is done, a good understanding of algorithms and knowledge about driving time analysis is also required. There is a case where developers need to implement something that has not been studied before, in this case there are no prescriptive algorithms to use and the developer will have to use his knowledge in algorithms to create the algorithm template or the temporal algorithm for utility purposes. With better understanding of algorithms and algorithmic thinking, it will be easier to solve problems which you are assigned as a programmer in a good way [5]. Branded software program determines the amount of algorithms combined with data structures. [6] .Algoritized computer programmable software operators and utility executives. For example, the troubleshooter problem. Figure 2. The illustrator function accepts two numbers and returns the sum. Referring to the definition for algorithms, the connection is shown that the function in Figure 2.1 is only a series of instructions that the computer should perform.

[image: i.imgur.com]Figure 2.1: Function for summing two numbers implemented in C ++.


Good algorithms and good implementations are important for programmers as we are always striving for the program to be effective. Easy-to-use performance programs are important because the end user is free from problems such as the program locks after it is stuck in a process that takes a long time to complete. An example where it is possible to apply for a compulsory tax program locker and a cross-border transaction when a trader sets up that one's shares will be sold automatically when a certain price has been reached. Had the program been implemented in a non-effective manner, the dealer could have lost a lot of money [7].

2.2 Big-O Notation


Big-O is used as a term to describe how the size of a function grows depending on the size of the input. Big-O classifies functions depending on its upper asymptotic boundary, it is a way to characterize the algorithm's warp time runtime. [2] .The Big-O function is denoted O (n) the instantaneous fall, Big-O describes how the function grows linearly when n grows for input n. An example is the linear search implementation list for an object if the list contains n element then at worst n element must be searched through and the function can be described as 0 (n) as the worst case is that all elements in the list are checked. The reason why Big-O is a very effective tool and used in computer science is that it facilitates comparisons of algorithms because it is easy to estimate how the runtime of an algorithm is affected by the size of input data. According to Donald Knuth, Big-O is found as:

[image: i.imgur.com]Generally, the efficiency of an algorithm is determined by how long it takes to process it clearly. If the time for an algorithm to run clearly increases as the size of the input increases, one can compare which algorithm is the fastest as the size of the input data grows. When comparing how driving time is affected depending on the size of input, the worst case scenario of the algorithms is compared to driving time. The reason that comparison of the worst case scenario of the algorithms takes place is that an estimate of how much time it takes for the scraper-arbitrary data algorithm to be estimated. As the processors of the harolica prioritization, the operations need to calculate exactly how long running time a program has, and this is why reasoning is used as a way of theoretically how the algorithm changes depending on the size of input data. Big-O is not a way to accurately compare algorithms because what is taken into account is the order of functions [9]. An example of why Big-O is not accurate but makes it easier for work is to compare two functions f and g which are of the same order, i.e. f (n) g (n). Assume that the functions f and g are defined as f (n) = n2 and g (n) = n2 + 2n + 3 as visualized in Table 2.1, it is seen that the functions f and g have relatively similar growth compared to a function of the order of 2n [ 9].

Applied to Ordo on program code, it is possible to see a similarity between the growth of mathematical functions. Take Example Figure 2.2 which shows a constant function that in Ordo is denoted as O (1). The function implemented is constant because it is independent of the size of the input and always runs at the same time. The code shown in Figure 2.3 is a function which stores all types of combinations of elements in a list, calculates how many times each item in the input data is processed appears due to the "nested-loops" (Loop inside a loop)
[image: i.imgur.com]

Table 2.1: Comparison of the growth of n2, n2 + 2n + 3 and 2n.

each element is treated n × n = n2 times for an input of the size n. If the function in Figure 2.3 had an input on a list of 3 elements, the output had resulted in 9 combinations. The three complexities noted so far O (1), O (n) and O (n2) can be represented by graphs, which gives a clear picture of how they relate to each other, as shown in Figure 2.4.

[image: i.imgur.com]Figure2.2: The function magnitude order O (1) as a control parameter evenly implemented in Java.
[image: i.imgur.com]
Figure 2.3: Function with the order of O (n2) that handles all combinations in a list implemented in Java.

[image: i.imgur.com]
Figure 2.4: Gradient comparison of functions with complexity O (1), O (n) and O (n2).

3. Discussion


The question why algorithms were important in computer science was asked and it was answered with an introduction to algorithms as well as to algorithms' place in programming. The algorithm definition can be linked to the program function features, both accept the interfaces and produce one or more evaluations, and I think it's a good way to link algorithms to our workplace as data savers. The result also mentioned the risks of not having enough knowledge about algorithms when implemented. Is the algorithm for how the trading system for stocks is managed poorly implemented, people can lose money and if algorithms for, for example, built-in systems in hospitals do not work properly, people can lose their lives. One way to compare algorithms with each other is through its asymptotic values, and what is mentioned in this report is its upper limit, which is also called Big-O, one-time-based explanation of the worst case scenario of the desktop driver algorithm when it comes to the value that is measured be driving time. Because there are many factors that play its part when it comes to running time for a program, Big-O simplifies calculations, making it much easier to compare algorithms at a theoretical level. This makes Big-O a tool to facilitate the process of assessing which algorithm scales best. Interesting is how to connect everything and how to program code scaled by Big-O. This gives a picture of how to compare different implementations with each other, which provides a way to theoretically assess which code is running fastest or most efficiently. To check its code for how many times it treats objects, it is considered that the vulnerability of the employee has failed to fulfill its function, and if it is possible to improve the implementation. The key method for calculating the Big-O of a function is as simple as calculating how the input is processed.

4. Conclusion


Algorithms are a central part of computer science and there are a wide variety of uses. Good knowledge algorithms and problems can arise when software develops. Big-O is the tool used to simply calculate how algorithms relate to each other in the worst case scenario. Comparing how well algorithms scalar method to be used to calculate the amount of algorithms compasses best assignment probability. Big-O can easily be applied to program code by counting the number of operations that occur in the input of a function and how the operations relate to the input data.

Thanks, I Hope I could share some knowledge with you all!

Lets talk a little bit about it! What is your favourite Torn City Algorithm?


References:


Referenser
[1] Google. (2012) Googleinside search algorithms. [Online]. Available:
https://www.google.com/insidesearch/howsearchworks/algorithms.html
[2] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to Algorithms,
Third Edition, 3rd ed.The MIT Press, 2009.
[3] G. Futschek, Algorithmic Thinking: The Key for Understanding Computer Science.
Springer Berlin Heidelberg, 2006.
[4] A. A. A. Daffa, The Muslim contribution to mathematics.Croom Helm London,
1977.
[5] Topcoder. (2015) The importance of algorithms. [Online]. Available:
https://www.topcoder.com/community/data-science/data-science-tutorials/theimportance-
of-algorithms/
[6] N. Wirth, Algorithms + Data Structures = Programs.Upper Saddle River: Prentice
Hall PTR, 1978.
[7] N. Popper. (2012) Knight capital says trading glitch cost it 440 million. [Online].
Available: http://dealbook.nytimes.com/2012/08/02/knight-capital-says-tradingmishap-
cost-it-440-million
[8] D. E. Knuth, Big omicron and big omega and big theta, ACM Sigact News, vol. 8,
no. 2, pp. 1824, 1976.
[9] P. Danziger. (2015) Big o notation. [Online]. Available:
http://www.math.ryerson.ca/ danziger/professor/MTH607/Handouts/bigO.pdf













SharpMid [1833276]

Thanks for your input but I think we all should take our time and enjoy the small things around us. Just as you would enjoy a beautiful garden you should be able to take some time and enjoy some beautifully constructed algorithms that helps you play this game.

EDIT: I will fix the links for my references soon! Sorry about that. The Torn city forum is not easy on formatting.
Food [2068524]

Excuse you? And i think we get what an algorithm is... u shud at least give insight on torn algorithms... maybe speculation on slots
SharpMid [1833276]

Good idea! Thank you.

But still this is a good thread before talking more about Torn algorithms because we can just learn a little bit about algorithms in general before we dive in to what we are actually playing with. Kinda like you have to walk before you can run!
SharpMid [1833276]

Then maybe we could talk about how some algorithms could be modified to remove "horny, pathetic losers and corrupt stuff", what do you think should be changed for three things to go away?
TheLuvlillypink [1914803]

Well, firstly, Ched should make me the head of staff so I can deal with the other staff members and teach them a 'lesson'.

And for those horny, pathetic losers, it's all on them. Maybe they just need to get laid more in real life.
SharpMid [1833276]

Maybe an algorithm could be constructed to match Torn players in real life? Maybe we're talking something like pokémon go with city finds for Torn.

That way scrony pathetic looser kids would get laid more in real life.
Vladar [1996140]

1) if you really want to do this it would probably be better suited to the guides section

2) if anyone wants this much detail, they could just do a google search or look on Wikipedia

3) None of this is Torn Specific

4) I love your enthusiasm for algorithims.
SharpMid [1833276]

1) I think its suitable for General since we are discussing a part of Torn. I wanted us to talk about our favourite Torn algorithms.

2) This is more than what wikipedia contains. This is a paper I've previously written for school.

3) See 1.

4) Thanks, I like you.