[爆卦]Randomness test是什麼?優點缺點精華區懶人包

雖然這篇Randomness test鄉民發文沒有被收入到精華區:在Randomness test這個話題中,我們另外找到其它相關的精選爆讚文章

在 randomness產品中有121篇Facebook貼文,粉絲數超過3,460的網紅Taipei Ethereum Meetup,也在其Facebook貼文中提到, 📜 [專欄新文章] Gas Efficient Card Drawing in Solidity ✍️ Ping Chen 📥 歡迎投稿: https://medium.com/taipei-ethereum-meetup #徵技術分享文 #使用心得 #教學文 #medium Assign r...

 同時也有31部Youtube影片,追蹤數超過234萬的網紅หลอน ก่อน นอน,也在其Youtube影片中提到,สติ๊กเกอร์ไลน์น่ารักเวอร์จากหลอนก่อนนอน ไอเท็มทีชาวหลอนต้องมี https://store.line.me/stickershop/product/8312872/th **********************************...

  • randomness 在 Taipei Ethereum Meetup Facebook 的最佳貼文

    2021-09-23 21:53:53
    有 6 人按讚

    📜 [專欄新文章] Gas Efficient Card Drawing in Solidity

    ✍️ Ping Chen

    📥 歡迎投稿: https://medium.com/taipei-ethereum-meetup #徵技術分享文 #使用心得 #教學文 #medium

    Assign random numbers as the index of newly minted NFTs

    Scenario

    The fun of generative art NFT projects depends on randomness. The industry standard is “blind box”, where both the images’ serial number and the NFTs’ index are predetermined but will be shifted randomly when the selling period ends. (They call it “reveal”) This approach effectively solves the randomness issue. However, it also requires buyers to wait until the campaign terminates. What if buyers want to know the exact card right away? We’ll need a reliable onchain card drawing solution.

    The creator of Astrogator🐊 isn’t a fan of blind boxes; instead, it thinks unpacking cards right after purchase is more interesting.

    Spec

    When initializing this NFT contract, the creator will determine the total supply of it. And there will be an iterable function that is randomly picking a number from the remaining pool. The number must be in range and must not collide with any existing ones.

    Our top priority is accessibility/gas efficiency. Given that gas cost on Ethereum is damn high nowadays, we need an elegant algorithm to control gas expanse at an acceptable range.

    Achieving robust randomness isn’t the primary goal here. We assume there’s no strong financial incentive to cheat, so the RNG isn’t specified. Implementers can bring their own source of randomness that they think is good enough.

    Implementation

    Overview

    The implementation is pretty short and straightforward. Imagine there’s an array that contains all remaining(unsold) cards. When drawIndex() is called, it generates a (uniform) random seed to draw a card from the array, shortens the array, and returns the selected card.

    Algorithm

    Drawing X cards from a deck with the same X amount of cards is equal to shuffling the deck and dealing them sequentially. It’s not a surprise that our algorithm is similar to random shuffling, and the only difference is turning that classic algo into an interactive version.

    A typical random shuffle looks like this: for an array with N elements, you randomly pick a number i in (0,N), swap array[0] and array[i], then choose another number i in (1,N), swap array[1] and array[i], and so on. Eventually, you’ll get a mathematically random array in O(N) time.

    So, the concept of our random card dealing is the same. When a user mints a new card, the smart contract picks a number in the array as NFT index, then grabs a number from the tail to fill the vacancy, in order to keep the array continuous.

    Tweak

    Furthermore, as long as the space of the NFT index is known, we don’t need to declare/initialize an array(which is super gas-intensive). Instead, assume there’s such an array that the n-th element is n, we don’t actually initialize it (so it is an array only contains “0”) until the rule is broken.

    For the convenience of explanation, let’s call that mapping cache. If cache[i] is empty, it should be interpreted as i instead of 0. On the other hand, when a number is chosen and used, we’ll need to fill it up with another unused number. An intuitive method is to pick a number from the end of the array, since the length of the array is going to decrease by 1.

    By doing so, the gas cost in the worst-case scenario is bound to be constant.

    Performance and limitation

    Comparing with the normal ascending index NFT minting, our random NFT implementation requires two extra SSTORE and one extra SLOAD, which cost 12600 ~ 27600 (5000+20000+2600) excess gas per token minted.

    Theoretically, any instantly generated onchain random number is vulnerable. We can restrict contract interaction to mitigate risk. The mitigation is far from perfect, but it is the tradeoff that we have to accept.

    ping.eth

    Gas Efficient Card Drawing in Solidity was originally published in Taipei Ethereum Meetup on Medium, where people are continuing the conversation by highlighting and responding to this story.

    👏 歡迎轉載分享鼓掌

  • randomness 在 本土研究社 Liber Research Community Facebook 的最佳解答

    2021-09-20 22:57:27
    有 84 人按讚

    【研究推薦】Be Water, My Friend 解放新.海洋空間想像 #都市化洋謀 #9月專研

    提到海,大部分香港人大概會想起與樓價密切相關的海景、娛樂化的水上活動、貴價深海海鮮食材、人工沙灘,或不時有臭味的海濱長廊,以至填海、明日大嶼願景,而理解海洋本身似乎一片空白,彷彿只有在以上商業及地產框架內,海洋才有其價值。除此之外,究竟我們應該如何理解海洋?

    一篇2015年由英國杜倫大學地理學系教授 Philip Steinberg及英國威爾斯亞伯立斯威大學地理及地球科學學系學系學者 Kimberley Peters發佈有關「海洋本體論」的學術文章 ”Wet Ontologies, Fluid Spaces: Giving Depth to Volume through Oceanic Thinking”。文章帶領我們離開以人類為中心、以陸地為主的視野,由本體論(ontology)的角度重新認識海洋的運動(motion)、流動性(fluidity)、深度(depth)、容量(volume)以及隨性(randomness)等特性,簡而言之,就是從海洋本身出發,去問海洋是甚麼?

    這正好回應,現時海洋簡單地被視為可被「填平」的空間,將海洋中的特性視如無物,亦不清楚陸地與海洋規劃的分別,有時甚至連填海物料也不太清楚是什麼。這種思維正進一步收窄我們對於海洋的空間想像,讓我們應對「明日大嶼」等填海計劃時亦顯得乏力。

    文中一開頭引用德國法學家施密特(Carl Schmitt) 於”The Nomos of the Earth” 一文中,認為海洋並沒有特性,除了海浪就只有海浪(The sea has no character, ...... On the waves there is nothing but waves)。撇開當代有關海洋符號學以及地緣政治學的學術理解,這種扁平化的海洋想像亦會引伸出一套「土地規劃」視覺,將海洋像陸地領土一樣切割、分配及加工建設,人為置入式改造海洋。最近的龍尾「海膽黑沙灘」為例,正好凸顯這種「暴力」人工改海的潛在災難,忽視吐露港一帶的水質評估、海灘選址的海水對流動向、以及鄰近具生態價值的海洋生物等等以海洋為整體的規劃考量。

    海洋既非空無一物,那我們應如何定義海洋?作者認為,海洋除了充滿各樣的生物,作為一個流動的世界,地方(place)永遠正在形成,更是一個權力關係投射、通過及圍繞的空間(a world of fluidities where place is forever in formation and where power is simultaneously projected on, through, in, and about space)。可見,陸地平面的、可理解的、有確立邊界的特性幾乎與海洋完全相反。海洋為本的思考除了海洋本質上跟陸地不同,亦會影響如何認知海洋中的物質與非物質互動。相信以此作為出發點,我們才能找尋與陸上視覺以外海洋規劃新出路。

    要理解何謂流動(fluidity)的海洋,除了要閱讀今次推薦文章外,亦推薦透過呈現海洋生態的紀錄片,作為理解海洋流動且多變的特質的方法,除了講述正在消失的粉紅色「魚頭」的紀錄片《白海豚失樂園》(Breathing Room)外,近日最新一套關於香港海洋聲音的《聲之海Sea of noise》,亦呈現香港海洋作為一個不斷有各種不同聲音流動混雜的空間。

    紀錄片中呈現,聲音在海洋裏傳播的速度為在陸地上的五倍,傳播的距離也比在陸地上遠得多。原來對於倚靠聲音作溝通媒介的海洋生物而言,海洋工程的影響下,置身海洋中就如長期在工地裏生活,噪音大大影響牠們探索環境、與同伴溝通、甚至覓食。再反思香港近年在海上的基建,為補償三跑工程對白海豚生境作出的破壞而設立的大小磨刀洲海岸公園,竟選址在三跑項目旁邊,該海城一直受高速船影響,鄰近又不斷有工程進行,成立這個名義上的海岸公園,其成效不足可想而知,嘗試滿足的,可能只是反對三跑的民意。

    放眼未來,不斷上馬的大型填海項目明日大嶼、海洋旅遊化等海洋產業,以規劃土地的眼光去規劃海洋,除了對環境做成不可彌補的破壞,更甚進一步收窄我們對於海洋的豐富想像。因而,要尋求現時香港海洋規劃的新出路,第一步先要理解陸地與海洋的巨大差異:海洋既沒有如陸地般有意義的邊界,亦是個擁有不同流動性與特質的空間。輕率將陸地城市發展的思維貿然在放在海中心,或許會出現「蝴蝶效應」,招致意想像不到的災難。

    #圖片由研究員Kristy提供
    #研究員潛水訓身演出
    #bewatermyfriend
    #海洋規劃新出路
    #研究閱讀

    Reference

    Steinberg, P., & Peters, K. (2015). Wet Ontologies, Fluid Spaces: Giving Depth to Volume through Oceanic Thinking. Environment and Planning D: Society and Space, 33(2), 247–264.

    💪 研究自主 月捐撐起最新專研系列:
    https://liber-research.com/support-us/
    🔸FPS ID:5390547
    🔸HSBC PayMe 捐款支持:https://bit.ly/32aoOMn
    🔸戶口號碼:匯豐銀行 640-198305-001 (LIBER RESEARCH COMMUNITY (HK) COMPANY LIMITED)
    👨‍👩‍👧‍👦義工招募:https://bit.ly/2SbbyT3

  • randomness 在 Cyber Games Arena Facebook 的最佳貼文

    2021-08-25 17:44:24
    有 20 人按讚

    【「CS:GO 香港大師賽」 賽事結果🎉】

    經過五場緊張又刺激嘅比賽,「CS:GO 香港大師賽」已經完滿結束👏,Yimagen 一度以 0:2 落後 Only One Word,最終 Yimagen 以局數3:2 反超前Only One Word 勝出 CS:GO 香港大師賽並取得代表香港出戰IESF 2021 亞洲預選賽嘅資格!恭喜哂 Yimagen 希望 Yimagen 繼續喺之後嘅比賽都有出色嘅表現。同時亦都多謝線上同線下嘅你支持,我哋下個比賽再見👋!

    ————賽事結果————
    冠軍:Yimagen
    亞軍:Only One Word
    季軍:DNDL
    季軍:Randomness

    #SteelSeriesHK #ArctisPrime #ForGlory #EsportsSymmerFun #CHKCI #EILAT2021 #ESAHK #Cyberport