TechBlog cikkei
2012-08
Exponenciális interpolálás 3 ponton
Unknown magic content: 'mathml'
Egy zenei fórumon a következő problémába futottam: valaki exponenciálisan szeretne paramétereket skálázni. Ez azt jelenti, hogy van egy $[x_\min, x_\max]$ intervallum, amit exponenciálisan le szeretne képezni egy $[y_\min, y_\max]$ intervallumra. A feltétel, amit előírt, hogy van egy bizonyos $x_\mathrm{avg}$ szám, aminek a képe az $y_\mathrm{avg}$ számnak kell, hogy legyen (az eddig megadott hat valós szám tehát előre ismert paraméter).
Ebből kéne kitalálni, hogy melyik az az $y = a \mathrm{exp}\left(bx\right) + c$ alakú függvény, ami az egyik intervallumot a másikra képezi.
Elsőre látszik, hogy itt a kulcs a $b$ paraméter meghatározása lesz. Ha ugyanis $b$ ismert, akkor $a$ és $c$ meghatározása visszavezetődik egy lineáris egyenletrendszer megoldására, a következő módon:
A probléma tehát tényleg a $b$ paraméter megadásán múlik.
Ha az ember kellően sokat ügyeskedik, akkor a fenti kifejezések visszahelyettesítésével végül a következő egyenletig jut el:
ahol $\alpha = \frac{x_\mathrm{avg}}{x_\min}$ , $\beta = \frac{x_\max}{x_\min}$ és $\gamma = \mathrm{exp}\left(bx^\min\right)$. Vagyis, ha sikerülne a fenti egyenletből $\gamma$-t meghatározni, akkor kész is vagyunk.
És ez az a pont, ahol elakadtam...
Team Fortress 2 LAN-ban
Ezt a linket elteszem az utókor számára, ha még egyszer találkoznánk ezzel a problémával:
http://gaming.stackexchange.com/questions/26664/how-can-my-friend-and-i-play-tf2-against-bots
A lényeg:
Here is an instruction on how to create a server and put bots on it:
- Make sure you have the port 27015 accessible for connections.
- Open the game console. (Options⇨Keyboard⇨Advanced...⇨Enable developer console. Press ~ / ` to open the console at any time.)
- Type sv_lan 0 if you want the game to be public, or sv_lan 1 for LAN only.
- Type map <mapname>, replacing <mapname> with the name of the map you want to play. Or press the [+] to the right of BROWSE SERVERS in main menu instead.
- If the server is public and you don't want anyone to intrude, you can set a password: Type sv_password <pass>, replacing <pass> with some simple password. (e.g. sv_password 1234)
- Set the bot difficulty: tf_bot_difficulty <x>, where <x> is from 0 (the easiest) to 3.
- Add bots: tf_bot_add <team> <class> (<team>: red | blue; <class>: scout | soldier | pyro | demoman | heavyweapons | engineer | medic | sniper | spy.) To remove all bots: tf_bot_kick all
Here are some ways for your friend to connect. If one fails, try the next one.
- Join the game via Steam. (In Steam Friends list press ▼ and Join Game. In console: connect <ip>:27015, where <ip> is your (server's) IP address, e.g. connect 11.22.33.44:27015)
- Try the same thing with your (server's) local IP address (find it in Windows/Linux)
If nothing works, see the step 1 of server creation instruction.
Apocalypse KÖZÖS
'Paranoia is a very comforting state of mind. If you think they're out to get you, it means you think you matter.'